Help improving federation between Lemmy and other projects

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.

1 Like

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.

2 posts were split to a new topic: Universal login option and remote authentication

@nutomic I tried federating a Like from https://fed.brid.gy/ to lemmy.ml just now and got a 400 on the AP inbox delivery. Details in support Lemmy · Issue #372 · snarfed/bridgy-fed · GitHub . Let me know if I can help!

1 Like

Lemmy doesnt support actor as an object like you are sending. It has to be a string value containing the actor id. Here is an example:

lemmy should accept inlined objects as well; if it does not, this is a bug in lemmy

2 Likes

(details in the AS2 spec: Activity Vocabulary)

1 Like

Lemmy doesnt use json-ld but only plain json, so this is not trivial. In any case I havent seen any project which sends actor in this way, so its low priority for me. Contributions welcome!

1 Like

it should be trivial to just extract the id from the inlined actor if you really must fetch it…

ideally, regardless of whether you used json or json-ld, you would be using a partial hydration strategy to expand the object (or graph) as needed. meaning, you would store nodes by their id and inject them into the json object (or the json-ld graph) as needed from your cache or via a network request.

example: you try to access actor.name but fail because that node has not been hydrated yet:

{
  "actor": "https://fed.brid.gy/snarfed.org",
  "object": "http://ds9.lemmy.ml/comment/1",
  "audience": "https://enterprise.lemmy.ml/c/tenforward",
  "type": "Like",
  "id": "https://fed.brid.gy/activities/like/fd61d070-7382-46a9-b2b7-6bb253732877"
}

so you try to expand the actor property:

{
  "actor": {
    "url": "https://fed.brid.gy/r/https://snarfed.org/",
    "image": {
      "url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
      "type": "Image"
    },
    "type": "Person",
    "name": "Ryan Barrett",
    "icon": {
      "url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
      "type": "Image"
    },
    "id": "https://fed.brid.gy/snarfed.org",
    "preferredUsername": "snarfed.org"
  },
  "object": "http://ds9.lemmy.ml/comment/1",
  "audience": "https://enterprise.lemmy.ml/c/tenforward",
  "type": "Like",
  "id": "https://fed.brid.gy/activities/like/fd61d070-7382-46a9-b2b7-6bb253732877"
}

now you can access actor.name successfully.

this way, if you are given an inline representation that you trust, you can just use it as-is. if you don’t trust it or it is not there, you can replace that node with a trusted version.

1 Like

You are right this isnt complicated, in fact we are already doing the same thing in some other places. Unfortunately I dont have time to work on this, but if you want to make a contribution I would gladly guide you through the code.

1 Like

Integration with Hubzilla would be nice. Hubzilla already has discussion groups (which it calls public forums) so it already understands what a forum is. That would make federation between Lemmy and Hubzilla easier.

Right now Hubzilla’s interface more closely resembles a discussion group than a forum, but I am actually working on changing that by creating new views and themes that give it a more traditional forum interface.

The best way to federate would be to use Hubzilla’s native Zot6 protocol, but considering that most platforms use ActivityPub, you might get “more bang for the buck” by using that protocol instead. (It should be noted that ActivityPub is an addon in Hubzilla, so the site admin must activate it.)

An alternative would be to use OpenWebAuth, which would allow people to remotely authenticate with their existing social identity. If you integrate that technology, people from Lemmy and Hubzilla could remotely authenticate on each other’s website, and participate in each other’s forums with one social identity.

1 Like

Activitypub is definitely the way to go, because other approaches would require major new features in Lemmy.

In order to get federation working, I need examples of the json data which Hubzilla sends, such as actors, objects and activities. These files will be integrated with our test suite to make sure they can be parsed successfully. See this folder for examples from other projects. If you could send me this data it should be easy to make both projects compatible.

2 Likes

I’ll see what I can find. I am not a developer on the Hubzilla project, but I’ll try to figure it out. Maybe @macgirvin and @Mario can shed better light on how all this works on the back end.

One thing that frustrates me is that Hubzilla had to format its ActivityPub messages in a way that is compatible with Mastodon. And since Mastodon does not currently understand what a forum or group is, a lot of creative hacks had to be made to get forums to work with Mastodon. (As someone developing themes for Hubzilla, this affects me since it changes how the data is stored in the database.)

For example, since Mastodon will reject messages from people you don’t follow, the first post in a forum thread must be owned by the forum, and not the actual author. If it is not done this way, Mastodon users who follow the forum will not see new posts.

This may be changing as Mastodon is considering adding groups. This would mean that forums on Lemmy and Hubzilla don’t have to pretend to be a regular social media account to work with Mastodon.

1 Like

I still think OpenWebAuth is an important option to consider. It allows people to use their social identity as a log in. You could use one Lemmy account to log into any other Lemmy or Hubzilla or Streams or OpenWebAuth-compatible website. It allows people to participate directly on other websites, not just through their notifications on their own instance.

Ah I misunderstood. In that case it should be enough if you send me some links to different types of data on Hubzilla, specifically user and group profiles as well as different types of posts.

I commented here about Mastodon compatibility.

1 Like

Basically, there are four types of accounts: personal, public, community forum, and custom. Community forums behave slightly differently than the others.

I am not sure which forums have ActivityPub enabled, so I think the best thing to do would be to use a test forum. That way we can try all sorts of experiments without messing with a live channel.

If you want a local account, I can give you one. Eventually I will be opening up this website to anyone who wants to create an account, but the website is actually still at the pre-launch stage, so I limit who can sign up for now.

Here is an example of an ActivityPub-enabled public account (my account):