this post was submitted on 23 Jan 2025
1 points (100.0% liked)

ActivityPub

0 readers
4 users here now

Focused discussion related to ActivityPub integration in NodeBB

founded 4 months ago
 

767e2ed4-8089-40ab-92a8-7fb2204b20bd-image.png

I thought that if I entered a Fediverse address here, like '@[email protected],' it would follow that user, and their posts would then appear in the corresponding category.

But that's not happening. There's also no meaningful error message. The actor you see in the image probably appears because I entered an incorrect address.

Does this feature need to be enabled on the Fediverse instance 'nrw.social'?

Who can help?

top 20 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 week ago

nrw.social is a mastodon instance, which does not create group actors. Lemmy, Mbin and PieFed do. In Lemmy terms, a group actor is called a "Community". Every lemmy instance lists their communities at /communities, e.g. https://lemmy.world/communities.

Try putting "https://lemmy.world/c/technology" into that field and see what happens.

[–] [email protected] 1 points 1 week ago

It's automatic. But you might need to refresh the page before you see the result. Following an actor involves sending a follow activity and then waiting for an accept activity to be sent back. In Lemmy it should be sent almost immediately.

Some personal Mastodon accounts have manual approval of followers but that doesn't apply here. Still, the same communication happens under the hood.

[–] [email protected] 1 points 1 week ago

I think 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 :)

[–] [email protected] 1 points 1 week ago

I did ask chatgpt, its new super familiar / friendly tone surprised me :ghost:

chatg1.png

chatg2.png

[–] [email protected] 1 points 1 week ago

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

[–] [email protected] 1 points 1 week ago

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] 1 points 1 week ago (2 children)

Thank you @[email protected] , now it's getting clearer in my head. I have added "https://lemmy.world/c/technology" , actual status is pending.

How long does this take? Is it an automatic process, or is it manually approved by an admin? So many questions...

[–] [email protected] 2 points 1 week ago

status is pending.

It gets stuck. Truth be told, it should be reworked as it's so buggy.

[–] [email protected] 1 points 1 week ago (1 children)

@FrankM Running into the same problem on my end (2 days and it seems my follow 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

[–] [email protected] 1 points 1 week ago (2 children)

@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?

[–] [email protected] 1 points 1 week ago

@julian frank stated in their post above here that they "added "https://lemmy.world/c/technology" , actual status is pending."

[–] [email protected] 1 points 1 week ago (1 children)

@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

[–] [email protected] 1 points 1 week ago (1 children)

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:

  1. NodeBB admin tries to follow a Lemmy community
  2. NodeBB marks the follow as pending
  3. Lemmy records NodeBB as a follower
  4. Lemmy community tried to send an Accept back
  5. 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.

@arachnibot @FrankM

[–] [email protected] 1 points 1 week ago (1 children)

@julian

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]

[–] [email protected] 1 points 1 week ago (1 children)

I opened an issue on Lemmy's repo

https://github.com/LemmyNet/lemmy/issues/5354

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] 1 points 1 week ago (1 children)

@[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!

[–] [email protected] 1 points 1 week ago (1 children)

@[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!

[–] [email protected] 1 points 1 week ago (1 children)

@julian said in Is ActivityPub too complicated?: > Let me look into nodebb-to-nodebb folllowing, that definitely should be working!

Have you verified that it is? Because I'm getting a never-ending Pending status when trying to sync to @testing-ground. Things federate fine, but without the syncing being established, they either don't get addressed to my instance, or are dumped into /world if I specifically reference someone on my site. And it's a little weird that they're not all ending up in /world, because I have an account that's following @testing-ground.

[–] [email protected] 1 points 1 week ago

@Kichae I'm not seeing an issue (although I haven't done exhaustive testing) between my test instance and this site.

Can you let me know one of your federating categories, so I can try to set up a sync?

[–] [email protected] 1 points 1 week ago

I tried to sync @[email protected] with @testing-ground.