How does lemmy federate communities? - Privacy Community

When I follow a community remotely, its handle always mimicks that of a user. E.g, asklemmy is

Does this imply that communities can reserve usernames? If not, how does Lemmy distinguish between users and communities remotely?

it actually is !! usernames start with @, communities with !

The followup question then is whether a community and a user can have the same name, because to other AP software they both just become @name@instance. How does that get resolved?

Yes, lemmy allows communities and users to have the same name. Other software may not be able to handle this, e.g. mastodon. This causes compatibility issues with mastodon if you search for a user and a community with the same name. I think mastodon will just ignore the community because the name is already reserved on that instance. But if you search for a community that doesn’t overlap with a user, mastodon will resolve it correclty

I started reading the page on lemmy federation details (I don’t know when that appeared, but it’s going to make better AP docs than the RFC, surely), and realised that in fact the @user@instance syntax isn’t even real AP. Now it makes sense.


Out of curiosity, how come Lemmy can’t expose communities as “@!community@domain” instead?

I’m not a lemmy contributor so everything i’m saying here is conjecture.

The problem is when any software does a webfinger request to get the Actor (which could be a user or community) they send a request that looks like GET lemmy’s response may contain multiple actors but mastodon expects only one actor. Lemmy handles this by fetching both actors in the webfinger response and checking their type, which will be User or Group (which is what lemmy calls communities).

Note that the webfinger request doesn’t include the leading @ or ! character because those character are just UI affordances to linkify the community. The !community@domain.tld format isn’t a part of any standard and is never exposed to other software.

Create a post

Support / questions about Lemmy.

  • 1 user online
  • 1 user / day
  • 1 user / week
  • 10 users / month
  • 45 users / 6 months
  • 1 subscriber
  • 129 Posts
  • Modlog