New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Activity Pub + Webfinger] user/community name collision #2037
Comments
Good find! In fact i intentionally put the community first so that it would be prioritize. You can make a PR to change the order here. |
This is a deficiency in Activity Pub, collisions are bound to haolen if various types of actors share the same namespace. The GNU Social folks have proposed FEP-2bca |
Webfinger works fine in Lemmy with identically named users/groups, as it goes through all of them and uses the one that has the expected type. Even Pleroma handles it fine, its just Mastodon thats causing trouble. The FEP looks pretty complex, so i dont think we would implement it anytime soon. |
I'm from ForgeFlux, a project that's involved in implementing Activity Pub based federation for software forges. A micro-blogging program like Mastodon has no real use for Group actors but projects like ours do. I feel, being stakeholders we should represent our requirements and I'd be grateful for any inputs the Lemmy devs could provide. As for implementing the spec, if the maintainers feel Lemmy could benefit from it, I'll gladly assist in it's implementation :) |
There are 5 different actor types in activitystreams, yet they all share the same namespace 😦 |
I've been loosing sleep over this. For all it's flexibility, activity pub is not flexible enough to make Groups first class citizens. |
@realaravinth I suggest you open a new issue for discussing about groups compatibility. Alternatively we can chat on Matrix (@Nutomic:matrix.org). |
Actually our dev chat room would be better: #lemmydev:matrix.org |
How Lemmy selects the actor? Webfinger query response doesn't contain any information about the actor type. It seems that the only way to find the specific actor is to fetch all objects with |
That is exactly what we are doing. Its like this, Lemmy has one database table for communities and one for users. So the names are completely independent and cant collide. I had originally represented this as |
You can add some metadata to a link relation object. Webfinger spec says that members of the
But I'm not sure what property identifier should be used in this case. Perhaps we can refer to ActivityStreams namespace: {
"subject": "acct:activitypub@lemmy.ml",
"links": [
{
"rel": "self",
"type": "application/activity+json",
"href": "https://lemmy.ml/u/activitypub",
"properties": {
"https://www.w3.org/ns/activitystreams#type": "Person"
}
},
{
"rel": "self",
"type": "application/activity+json",
"href": "https://lemmy.ml/c/activitypub",
"properties": {
"https://www.w3.org/ns/activitystreams#type": "Group"
}
}
]
} |
Thanks, I will try that when i have time. It would at least make parsing easier for Lemmy, though it wouldnt help with Mastodon compatibility. |
So that it is easier to parse for other software
So that it is easier to parse for other software
So that it is easier to parse for other software
It's working. Now a client can easily select actor depending on query prefix: |
@silverpill Thank you for suggesting this solution :) |
Issue Summary
When a user and a community share the same name, webfinger query groups both resources together, producing a single response:
I'm not sure how other activity pub servers choose which actor to contact but it looks like Mastodon is traversing in the reverse order(per the above linked webfinger response) and choosing the user actor.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: