We have created documentation on how exactly Lemmy federation works

This first document gives a high-level overview, without being too technical. It is roughly based on the federation.md proposal.

We also have a separate document that describes the exact JSON format used by Lemmy, and how the various fields are interpreted.

The links go to our test instance (which is already federating). It will also be available from dev.lemmy.ml once we deploy the next version.

If anything is unclear or missing from those docs, please comment here and we will add it.

6 Likes

In the second documentation given, it is said that:

Field Name Mandatory Description
name yes Name of the actor
preferredUsername no Displayname
// …
    "name": "riker",
    "preferredUsername": "Jean-Luc Picard",
// …

It seems that Lemmy uses preferredUsername field for display names and name for usernames, which is in contrast to the ActivityPub spec and fediverse implementations such as Mastodon:

// …
 "name": "Alyssa P. Hacker",
 "preferredUsername": "alyssa",
// …

Would it improve compatibility to follow the practice, or is it an intended design?

Thanks a lot for noticing this and pointing it out! It would have been a real problem if we found out about this after releasing federation.

That said, who thought this was a good idea? Its completely counterintuitive.

It seems ActivityStreams came first with name, and ActivityPub could only add a new property on top of that. (Especially since name is one of the few special properties that can also be a natural language map, and it seems preferredUsername is not)

Also, in our brief talks on Fedi, I know you do not have a goal to become ActivityPub compliant at this time. I was wondering if it is something being built towards on the long-term roadmap, even if not a priority anytime soon?

3 Likes

So far our goal has been to enable federation between Lemmy instances, and we almost finished with that (its a matter of weeks before we enable allowlist based federation on our main instance). Regarding ActivityPub compliance, we didnt expect that it would be so much additional work, so we didnt think to turn it into a milestone for our NLnet funding. But we definitely want that and I think we can get it done in parallel within the next few months.