LemmyNet / lemmy

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

Mastodon cannot follow Lemmy commmunity if a user has the same name as the community #1922

Closed sgornick closed 1 year ago

sgornick commented 3 years ago

For a community in which there is also a user with the same name:

Same for !crypto, ... https://lemmy.ml/c/crypto, does not work, but I can follow https://lemmy.ml/u/crypto

Yet other groups, where there is no user with the same name as the group, I was able to follow. no problem

The Mastodon instance I was trying this from runs Mastodon v3.4.3.

sgornick commented 3 years ago

This would cause a problem, I suspect, if a person were to register a name for an existing group (e.g., asklemmy) and then Mastodon users trying to follow that community would not be able to.

Nutomic commented 3 years ago

This is a Mastodon problem.

VictorVenema commented 3 years ago

This is a Mastodon problem.

Mastodon also does not feel responsible. https://github.com/mastodon/mastodon/issues/17008

Would be great if you guys would talk to each other directly.

Is it possible in Lemmy to change the name of a community? I would be happy to change my community from OpenScience to OpenScienceFeed.

Even if they are two different name spaces, it may be an idea to not allow names of communities and accounts to be the same in future.

Nutomic commented 3 years ago

@VictorVenema I replied in the linked issue. As the comment by Claire mentions, this problem is caused by unfortunate UX and database design in Mastodon, which means it is their responsibility. Note that user/community with identical names work just fine in Pleroma.

Renaming a community is not possible, you would have to create a new one. But on an instance with open signup, someone could create a user account with the same name at any time. Maybe it would be fine with Mastodon if the community is known first, i dont know.

Disallowing identical names for users and communities seems like a severe limitation. For example, some people like to create a community as a personal blog. All of that works perfectly fine between Lemmy and Pleroma at least, so the problem in Mastodon is not enough of a reason for such a change. At most it could be an admin option.

VictorVenema commented 3 years ago

In Mastodon it is possible to start a new account and move your followers and followed to that new account.* Is something like that already implemented in Lemmy? Then I would be happy to start a new account (somewhere else where they are willing to avoid clashes between groups and users).

* I feel this is important functionality, 1) it sets the Fediverse apart that we do not lock people in, but that they are free to move, like changing your mobile phone provider and 2) because it helps with servers no longer being maintained, which is unavoidable in a distributed system. 3) It helps keep the system distributed when people who will mostly start at the main site can move to another server once the know their way around.

Nutomic commented 3 years ago

No, that is not currently possible in Lemmy.

whatSocks commented 2 years ago

Disallowing identical names for users and communities seems like a severe limitation.

How about displaying a warning? If someone doesn't care about mastodon, they can ignore it.

whatSocks commented 2 years ago

https://lemmy.ml/u/bitcoin works (well, shows hourglass / waiting approval)

did it actually work? the hourglass thing is confusing. Also trying to follow a community and made sure there is no user with the same name.

VictorVenema commented 2 years ago

How about displaying a warning? If someone doesn't care about mastodon, they can ignore it.

Who does the warning go to? The new person making an account or the community that is kicked off of Mastodon? Or would you only let the same person make an account and community by the same name?

I really do not understand why @Nutomic thinks not being able to make a community and an account with the same name is a "severe limitation". I would call it a hardly perceptible limitation.

In addition, it is an improvement in clarity: My blog is called Variable Variability and once someone write a comment about "VV" and I had no clue whether they were talking about the blog or me, while that made a difference. So allowing such confusing double names forces people to always formally use the handle @ or ! lest they write something that is unclear.

Why not simply call yourself, e.g., Victor and the community VictorHome, VictorCommunity, VictorFeed, VictorBlog, VictorNews or whatever? Much clearer when the write about Victor and do not specify @victor or !victor. And it is interoperable, which is supposed to be one of the main selling points of the Fediverse that is flushed down the drain here.

victor commented 2 years ago

Funny that you are discussing a problem about naming clashes and decide to @-mention me so carelessly

Nutomic commented 2 years ago

I really do not understand why @Nutomic thinks not being able to make a community and an account with the same name is a "severe limitation". I would call it a hardly perceptible limitation.

@VictorVenema Lemmy treats users and communities completely separately, and they are stored in different database tables. So enforcing unique names between both of them doesnt really make sense as far as Lemmy is concerned. Adding such a limitation just because a single project cant handle it properly doesnt make much sense either in my opinion. Note that this problem doesnt happen with Pleroma, so there is no clear reason why it should be changed in Lemmy instead of Mastodon.

Also, in case there are a user and community with the same name, Lemmy always returns the community first in the webfinger response. So it should be easy for Mastodon to always federate the community, and ignore the user in this case.

Additionally, I dont think the Activitypub spec prohibits having multiple actors with the same name on an instance (tell me if I am wrong). So if a project like Mastodon has additional requirements, beyond the requirements of the spec and of similar projects like Pleroma, its not our responsibility to work around that.

asonix commented 2 years ago

activitypub makes no guarantees about the uniqueness of name or preferredUsername fields, only that id uniquely identifies an object

VictorVenema commented 2 years ago

I really do not understand why @Nutomic thinks not being able to make a community and an account with the same name is a "severe limitation". I would call it a hardly perceptible limitation.

@VictorVenema Lemmy treats users and communities completely separately, and they are stored in different database tables. So enforcing unique names between both of them doesnt really make sense as far as Lemmy is concerned. Adding such a limitation just because a single project cant handle it properly doesnt make much sense either in my opinion.

I get the internal Lemmy coding perspective and that in Pleroma it does not cause technical problems. I wish I would see any signs understanding of the Fediverse user perspective. But, well, I give up. It is your project.

Nutomic commented 2 years ago

This is improved with https://github.com/LemmyNet/lemmy/pull/2047. If there are a community and user with the same name, Mastodon now prefers the community (but the user doesnt work).

VictorVenema commented 2 years ago

Thanks for the great news. That solves my personal problem. I first thought the problem was still there because the avatar (likely cached) was of the user OpenScience, but the link went to the community OpenScience.

Nutomic commented 2 years ago

It would be possible to add a workaround for this, namely a config option federation.mastodon_compat (disabled by default). If enabled, it would prevent creation of a community, if a user with the same name already exists. This would solve the problem of an existing user being effectively hidden by a new community. If there is enough interest, I can implement this and instance admins could decide to activate the option (or not).

Another option that already exists is for instance admins to enable "Only Admins can create Communities".

VictorVenema commented 2 years ago

If enabled, it would prevent creation of a community, if a user with the same name already exists.

Maybe this was intended, but I would implement it both ways and also prevent the creation of a user if a community with the same name already exist to avoid that this user would be hidden on Mastodon. At sign up the user may not know the community yet or realized the consequences of the chosen user name.

silverpill commented 1 year ago

@Nutomic

Additionally, I dont think the Activitypub spec prohibits having multiple actors with the same name on an instance (tell me if I am wrong). So if a project like Mastodon has additional requirements, beyond the requirements of the spec and of similar projects like Pleroma, its not our responsibility to work around that.

Webfinger is not a part of ActivityPub spec. The acct: URI, in particular, is defined in RFC7565:

The "Internet resource" identified by an 'acct' URI is a user's account hosted at a service provider, where the service provider is typically associated with a DNS domain name. Thus, a particular 'acct' URI is formed by setting the "user" portion to the user's account name at the service provider and by setting the "host" portion to the DNS domain name of the service provider.

But in Lemmy acct URI does not identify an account, because it may point to both user and group at the same time.