Help improving federation between Lemmy and other projects

Lemmy already federates with Pleroma and Mastodon since two months. But there are a lot more projects out there, and it would be great to federate with them as well.

In terms of programming this is now relatively easy, as our rewritten federation code is quite flexible. However, I need help with testing from people who are familiar with these projects.

To get started, I will explain what does and doesn’t federate with Mastodon, as that’s the project I am most familiar with. Mastodon can fetch Lemmy Pages and Notes by entering their URL in the search bar. Mastodon replies to those will federate back to Lemmy. Persons and Groups can also be fetched, and groups can be followed (user following is not supported in Lemmy yet).

There are also things which don’t federate, because both projects work quite differently. Lemmy only supports Notes which are inside a Group, so it can’t fetch standalone Mastodon toots. Likes don’t federate because Mastodon treats them as private, while they are semi-public in Lemmy (federated between servers, but not exposed through the API). Private messages don’t work with Mastodon, because we use Pleroma’s ChatMessage extension.

So if there is a project that you would like to see federate with Lemmy, please test it. You don’t have to be a developer, but it helps if you run an instance in order to view the server logs. If there is something which should federate but doesn’t, please link the json of all involved objects and activities from the other project (examples). I will add them to our test suite, to ensure that they will keep working in the future.

1 Like

IIRC we’ve successfully federated Smithereen and Lemmy too :wink:

And I do have native groups. And they probably aren’t very compatible.

1 Like

Thats right, but so far our tests only include the Create/Note activity, it would be good to add others as well. Especially groups, as Lemmy has few mandatory fields in that regard. I should make it clearer by putting mandatory fields first, but i believe all of them are also mandatory in activitypub.

My groups should actually have all these.

username, set at account creation and can never be changed

That’s unfortunate. Let’s not repeat Mastodon’s mistake here, please. Usernames aren’t meant to be used as permanent identifiers. Everything except @id and type should be changeable.

Actually that comment is incorrect, it describes how the username is treated by the Lemmy API. When receiving a community (or another object) over federation, all data for that object id is overwritten. Will remove the comment.

1 Like

Hey, we are implementing ActivityPub groups for GNU social v3 :slight_smile:

We have some constraints (such as: they have to be fundamentally compatible with the groups we already have federating via OStatus (and offer, at least, the same functionality and usability)). Nonetheless, we are keeping Lemmy’s doc very close and doing our best to follow and be compatible with it!

@nutomic Do you have recommendations (maybe a test instance) that we can use? For now our tests are being between test GS instances and fixtures we write to test different flows.

1 Like

We have a few test servers that you can use. One is ds9.lemmy.ml, and the others are linked in the sidebar. You can also message me on Matrix (@nutomic:matrix.org) to talk about this.

1 Like

You can also always test with Guppe and Friendica’s group implementation. Lemmy is implementing it nearly the same way. I think it would be best if all systems would agree on a similar method.

1 Like

Thanks for letting me know. Do you know if Guppe and/or Friendica have docs and/or test instances?

To anyone else building groups: you can test with this Smithereen group as well. Write me on Telegram (@grishka) or Matrix (@grishk:matrix.org) if something doesn’t work and you need help debugging.

I don’t know if Guppe has got documentation. For Friendica you can always ask me. I have got some test groups on my development machine. But since I’m currently coding at our private group feature I can’t assure that everything will be stable at any time.

Do you have any documdntation on how to subscribe and send messages to the group?

Yes, it’s an extension of walls. Basically you follow/join the group and it starts sending you Add{Note} for new wall posts.

@heluecht et al. Please note that the old guppe groups on the main domain do not exist anymore.
It is now https://a.gup.pe where you find a few documentation.

Also I would like to add that this is a relay-group with public only addressing.
It is mega nice that it is specified.
In the meeting we had identified more questions and different implementations like e.g.
for the governance of the membership list or the things like context, covered in the meeting attached text by @cpmoser etc.