lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

[Bug]: Cannot distinguish between the user and the community if the usernames are the same

Open sorairolake opened this issue 1 year ago • 3 comments

Requirements

  • [X] Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a single bug? Do not put multiple bugs in one issue.
  • [X] Do you agree to follow the rules in our Code of Conduct?
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

I tried to search https://lemmy.ml/c/linux from Misskey to follow this community but couldn't. Unlike this, https://lemmy.ml/c/opensource was able to search successfully. The difference between these is that the former has a user with the same name as the community.

I tried searching [email protected] in https://misskey.io/ and https://mastodon.social/ (using https://lemmy.ml/c/linux, [email protected] and @[email protected]), both returned only the user (@[email protected]) as a search result, and sometimes the search failed (depending on the syntax).

https://github.com/misskey-dev/misskey/issues/14614#issuecomment-2371138023 states:

I don't think there's a clean way for Misskey to resolve this. The preferredUsername in both ActivityPub JSONs of u/linux and c/linux in lemmy.ml are linux. The webfinger for acct:[email protected] also doesn't show a clear distinction between the user/person and group/community.

IMO this is Lemmy's bug and they should resolve it.

I think that other ActivityPub implementations such as Mastodon, PeerTube, and Pixelfed, may also be unable to distinguish between the user and the community in such cases.

Steps to Reproduce

  1. Discover a user or a community with the same username
  2. Try searching for an account in other ActivityPub implementations

Technical Details

See above

Version

BE: 0.19.6-beta1

Lemmy Instance URL

lemmy.ml

sorairolake avatar Sep 24 '24 22:09 sorairolake

This was previously discussed in https://github.com/LemmyNet/lemmy/issues/2037. Basically Lemmy stores users and communities in different database tables (namespaces), so there is no problem having a user and community with the same name. The only possible solution would be to prevent community creation if a user with that name already exists (and vice versa).

Nutomic avatar Sep 25 '24 07:09 Nutomic

Is there any possibility to provide additional solutions to distinguish between the user and the community even in ActivityPub implementations such as Misskey and Mastodon which cannot distinguish between those?

sorairolake avatar Sep 25 '24 08:09 sorairolake

Is there any possibility to provide additional solutions to distinguish between the user and the community even in ActivityPub implementations such as Misskey and Mastodon which cannot distinguish between those?

No. Unfortunately, the choice of the Lemmy developers was a bit naive, because it did not take into account the serious limitations that today what is considered the "de facto standard" of the Fediverse and which is the most used software has.

However, the problem is that Mastodon is an ergonomically perfect software, but architecturally it is crap... Mastodon, Pleroma and Misskey are not able to distinguish between a normal user and a group user and this is ridiculous!

But if, instead of Mastodon, you used Friendica you would not have this problem and you would only have to search for the complete handle of the Lemmy community (https://lemmy.ml/c/linux), to find it, follow it and manage that user as an Activitypub group.... But not only that: if you also searched for the user @[email protected], you would find both, the user and the community!

This is why you should stop using Mastodon... :-)

image

informapirata avatar Sep 26 '24 17:09 informapirata

Nothing we can do about this, it needs to be fixed in Misskey.

Nutomic avatar May 30 '25 08:05 Nutomic