Is ActivityPub too complicated?
-
status is pending.
It gets stuck. Truth be told, it should be reworked as it's so buggy.
-
Some of the words, make ActivityPub more complicated to understand. Like what is an Actor ?
This may be basic to some, but Im still not sure what an Actor is in this context, and why that word was used.
Would be grateful if anyone can explain in one line -
@FrankM Running into the same problem on my end (2 days and it seems my follow to any group actors is stuck). Did you try to follow a non-group account when you got the 'null' actor on your list too? I get the feeling it's related to our endless pending on lemmy communities and such
-
@arachnibot happy to take a closer look, since the category sync functionality should be working but might have broken in the interim during development.
Can you let me know the Lemmy community you're trying to follow from your instance?
Edit: same for you @FrankM
-
@julian frank stated in their post above here that they "added "https://lemmy.world/c/technology" , actual status is pending."
-
Yeah, as mentioned - Lemmy is often quite bad at sending the 'Accept' back for a Follow. It's particularly the case if the instance hasn't heard of you before, because in the process of fetching your user and instance details, it 'forgets' about the Accept. Within Lemmy, everyone's sort of got into the habit of 'Subscribe / Unsubscribe / Subscribe'. (where the first 'subscribe' lets them get your details, and the second one actually gets an 'Accept' back.)
PieFed is more reliable at sending 'Accept' back, so it's maybe useful to check your logic from this end with a community from there, e.g. https://piefed.social/c/antisocialmedia
-
@julian
Thanks! Accidentally reset my database, but I was in the midst of trying the following group actors:[email protected]
[email protected]these two were my big tests, @[email protected] didn't seem to work too, but I forgot to re-test it after I manually took the null follow out from the database.
Should also note that the first two managed to show up in my original /world when following from my admin account, so I'm fairly sure posts were federating in properly to that
-
The logic is a little tricky to get right because there's a set sequence of steps that needs to happen in order for the group sync to succeed.
For example, between NodeBB and Lemmy:
- NodeBB admin tries to follow a Lemmy community
- NodeBB marks the follow as pending
- Lemmy records NodeBB as a follower
- Lemmy community tried to send an Accept back
- NodeBB marks the follow as established.
If steps 1-3 succeed but 4-5 fail, then posts might be sent to NodeBB, but NodeBB will silently drop them because they're not addressed to anyone it thinks is following the sender.
@freamon thanks for the heads up about lemmy's accept shenanigans, I'll take that into account... or maybe ask Felix about it.
-
Got it! Restored my database last night, but yeah it seems even a re-follow didn't get much to my category actor (outside of manually federating a share from my old mastodon)
Oh wait, I just realized I never shared the webfinger for the actor. mentioned below
@[email protected] -
I opened an issue on Lemmy's repo
Allow `Group` type to subscribe to communities · Issue #5354 · LemmyNet/lemmy
Requirements Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support Did you check to see if this issue already exists? Is this only a feature request? Do not put multiple feature requests in one issu...
GitHub (github.com)
The thing is, what is the actual end-result you're looking for? It sounds like you want stuff from a remote lemmy community to be sent to your NodeBB. If that's the case, you could just follow the community as a user. Search for
[email protected]
(for example) in the search bar, and once you follow the community, you will start seeing those posts in your/world
feed.The category synchronization options are for if you want to see a Lemmy community's posts in a category of your own. Might be that's what you want too.
But at present Lemmy doesn't support it
-
@[email protected] Oh I think I get you? I Mainly wanted to sync remote group actors to a category for organizational purposes.
In my exact case it would be to collect foreign group actors together so me and my pals can have a more conglomerated niche feed (i.e the games category has posts from local and remote groups sharing stuff about games). Sort of like mastodon's lists, but with cleaner organization. (if you need a more practical example let me know!)
I've got lemmy instances working in my /world feed, so that's good news, at least. Though, it doesn't seem I can follow other nodebb categories with my testing ground either. (for instance, https://community.nodebb.org/category/30/activitypub responds with pending as well, even if the other actors are removed from the category's following requests)
Thank you either way! I know activitypub support been a big goal of yours, so I really appreciate all the hard work!
-
Looks like I was wrong before: whilst it's true that Lemmy isn't always great at sending an 'Accept' back, that's not the issue here. I was thinking about it from the perspective of a Person following a Group, not a Group following a Group.
It'll be interesting to see how the Lemmy devs respond. It's not really relevant for PieFed, because I'm not sure that there's communities there that have enough activity to warrant syncing to a category, but I thought about what would happen if you tried, and it would fail. The follower would be checked to see if they are a Person, and the request would go no further if not (there's no handy error returned, though).
I'm not sure it would be possible to enable, with the way the database is currently set up. We have a 'community_member' table, that looks like:
pyfedi=# \d community_member Table "public.community_member" Column | Type | Collation | Nullable | Default ------------------+-----------------------------+-----------+----------+--------- user_id | integer | | not null | community_id | integer | | not null | is_moderator | boolean | | | is_owner | boolean | | | is_banned | boolean | | | notify_new_posts | boolean | | | created_at | timestamp without time zone | | | Indexes: "community_member_pkey" PRIMARY KEY, btree (user_id, community_id) "ix_community_member_is_banned" btree (is_banned) Foreign-key constraints: "community_member_community_id_fkey" FOREIGN KEY (community_id) REFERENCES community(id) "community_member_user_id_fkey" FOREIGN KEY (user_id) REFERENCES "user"(id)
So if the 'user_id' was actually a Group instead of a Person, then it would have a join to the wrong table.
-
@[email protected] said in Is ActivityPub too complicated?:
Mainly wanted to sync remote group actors to a category for organizational purposes.
Yeah that's a great use case, and definitely what it ought to be used for. Let me look into nodebb-to-nodebb folllowing, that definitely should be working!