Conversation
Notices
-
laurel (laurel@freespeechextremist.com)'s status on Saturday, 01-Jul-2023 19:16:12 JST laurel @Disabled
>fork of Lemmy software
Any chance you can fix this? (Pete wrote this a couple of days ago)
>1. I'm looking into lemmy interaction. I can follow lemmy users, see their public posts, but they don't show up in my timeline. They only show up if I go to their profile. Why?
Short version: it looks like Lemmy's fucking up the follower address.
The longer version: AP uses a series of URLs to say who a post is for, and those go into the "to" and "cc" fields. When you tag someone, their actor URL is in the "to" field. There are two special URLs that don't refer to individual users: "public" and "follower". The public URL is a constant, it's https://www.w3.org/ns/activitystreams#Public . If it's in "to", it's public, and if it's in "cc", it's unlisted, so you can see it in either case. The distinction between a public/unlisted post and a followers-only/DM post is that the public URL is omitted from those. The other special URL is the followers URL, which is user-specific. That URL is assigned by the server, and is supposed to be in your metadata. So if you do `curl -H 'Accept: application/json' https://freespeechextremist.com/users/laurel | jq -r .followers`, that'll spit out `https://freespeechextremist.com/users/laurel/followers`. Your followers URL is included in all of your posts except DMs, so when you post, "https://freespeechextremist.com/users/laurel/followers" is in the "cc" field. Not only does Lemmy appear not to provide a followers URL, they also seem to do some wacky shit with the to/cc when delivering posts.
So, pick a Lemmy user at random (I just did `SELECT * FROM "users" WHERE (split_part("ap_id", '/', 3) = 'lemmy.ml')`) and look at the AP URL, it's https://lemmy.ml/u/jokeyrhyme . Fetch the user and look for the followers address, `curl -H 'Accept: application/json' https://lemmy.ml/u/jokeyrhyme | jq .`. So there's no way to pick out the followers address. Then you look at a random post, `curl -H 'Accept: application/json' https://lemmy.ml/post/438428` and (although it's nice Lemmy pretty-prints the JSON) "cc" is empty and "to" just contains `["https://lemmy.ml/c/opensource","https://www.w3.org/ns/activitystreams#Public"]`, so
Boards, however, *do* have followers URLs: `curl -H 'Accept: application/json' https://lemmy.ml/c/opensource | jq -r .followers` gives `https://lemmy.ml/c/opensource/followers`. But they fuck that up, too! You can see that the post from before lists `https://lemmy.ml/c/opensource` in the "to" field, not `https://lemmy.ml/c/opensource/followers`.
This should be easy to fix, they just have to add a followers URL to users and stick that on their posts, and then add the advertised followers URL to boards' posts. So instead of `"to": ["https://lemmy.ml/c/opensource","https://www.w3.org