LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.25k stars 879 forks source link

Replies to federated comments #2218

Closed snan closed 1 year ago

snan commented 2 years ago

On this federated thread I replied to the comment which shows up in the Friendica original but not on the lemmy.ml view.

When I reply to comments that are directly on lemmy, it works fine.

dessalines commented 2 years ago

Could you show which one is missing on the lemmy.ml view?

The comment that starts with: "Other issue I face" seems to be in both places.

snan commented 2 years ago

My missing posts start "maybe that would be good" and "and for some reason".

Nutomic commented 2 years ago

I managed to fetch your comments to lemmy.ml by pasting their urls into the search bar. So this doesnt look like a bug, but some kind of network issue.

snan commented 2 years ago

My thinking is that activities were sent to the actor where the thread "lives" i.e. on Nerdica

Nutomic commented 2 years ago

Ah, its possible that Friendica delivers activities differently. In case of Lemmy, activities get sent to the community (as cc), and the community sends it as Announce to its followers.

cc @annando

annando commented 2 years ago

Friendica will always post any activity to the thread creator. Depending on some other constellations, the activity will also be delivered to the thread participants and possibly the followers of the actor.

Nutomic commented 2 years ago

I see, the community is not listed in to/cc fields of https://idiomdrottning.org/objects/c337b8db-061a-4c96-b6d4-9fd2e1a4ba0d, so it obviously couldnt receive the comment. I think your logic should be like this: when replying to a post/comment which has a Group in to/cc, you also need to copy that group id into the Note to/cc, and deliver the Create activity to the group inbox. And it needs to be the group id, not the followers collection.

annando commented 2 years ago

The system at https://idiomdrottning.org doesn't appear to be a Friendica system. It appears to me like possibly Pleroma.

But concerning the issue: Have you checked that the problem always happens when a post had been started via someone (Lemmy or Friendica user) and someone from Friendica replies to someone from Friendica?

Nutomic commented 2 years ago

Sorry you are right, i was just assuming Friendica because that was mentioned in the issue. Looks like a problem with Pleroma then.

snan commented 2 years ago

Correct, it's when Pleroma replies to a Friendica on Lemmy-community thread..

Nutomic commented 2 years ago

@clearlyclaire @lanodan This is a problem in both Pleroma and Mastodon. In short, Lemmy indicates that a post or comment was made inside a group by putting that group id in to or cc. But when Mastodon/Pleroma reply to a post/comment inside a group, they only include the id of the post creator. This happens to work if the user and group are located on the same instance, as was very common with lemmy.ml. But if the user is from a different instance, these comments will not reach the group, and cant be announced to its followers.

I made an example here, a post was made from ds9.lemmy.ml to the community main@voyager.lemmy.ml.

https://ds9.lemmy.ml/post/22033

https://voyager.lemmy.ml/post/1743

As you can see, both comments only reach the user's instance (ds9.lemmy.ml), but not the group's instance. You can see the activitypub json for each comment from the link behind the colored "fedilink" icon.

What you should do is this: when replying to an object with a group in its to/cc field, copy that to your own to/cc, and deliver the activity to its inbox.

annando commented 2 years ago

@Nutomic Friendica should behave correctly. Have you checked this or should I perform some checks on my side to be sure?

Nutomic commented 2 years ago

@annando I dont have a Friendica account, so it would be good if you could check.

annando commented 2 years ago

In a first test it seemed to work. But I realized some issues since I imported the starting post and also the group actor was unknown. I have to repeat such a test with some test post in a group that I already have subscribed.

snan commented 2 years ago

I've been looking into migrating from Pleroma to GoToSocial and today I stumbled across this, which seems to be about the same issue as this Lemmy thread: https://docs.gotosocial.org/en/latest/federation/behaviors/conversation_threads/

macgirvin commented 2 years ago

What you should do is this: when replying to an object with a group in its to/cc field, copy that to your own to/cc, and deliver the activity to its inbox.

I didn't see this in the spec. Did I miss it someplace?

annando commented 2 years ago

@macgirvin the group handling isn't specified in the specs, so we will have to create some best practices.

macgirvin commented 2 years ago

Good luck with that. We've got close to a dozen incompatible group implementations now, some of which aren't even documented - and some of them conflict with others. Like this one.

annando commented 2 years ago

At least Lemmy, gup.pe and Friendica are interoperable and also users from Mastodon, Pleroma or Misskey can participate in group discussions.

snan commented 2 years ago

I see Lemmy as sort of a super Guppe (since it has a web thread view and moderation). ♥ Thank you for making it

Nutomic commented 2 years ago

@macgirvin I really havent come across any incompatible, activitypub-based group yet. Can you name some of these projects, and ideally some documentation about their implementation?

Nutomic commented 1 year ago

FEP-1b12 documents how Lemmy groups work.

verymilan commented 1 year ago

Hmm but https://discuss.tchncs.de/post/24294 seems to lack some Lemmy replies ... subbed to some source server communities, hoping it will help with the situation...

edit: the number of missing posts decreased, maybe the delay is higher than i thought

edit2: about 40min later, only one is currently missing ... well thats just slow i guess

snan commented 1 year ago

Here is a comment that did not show up:

https://idiomdrottning.org/notice/AWcqfGUIh0jiQVOJPs

Even though some of my other comments have shown up there, after some delay:

https://feddit.de/u/Sandra@idiomdrottning.org