Lemmy-Discourse federation

@angus Im currently testing some new changes for federating with Discourse. Its pretty close to working, but now there is a problem because Discourse doesnt mark its posts as public. To fix this you should add "https://www.w3.org/ns/activitystreams#Public" either in cc or to.

Edit: The changes are now live on voyager.lemmy.ml so you can give it a try.

6 Likes

Exciting to see all this work on federation!

1 Like

@nutomic Exciting! Thanks for working on this.

We mark activities and objects as public when they’re being sent to an inbox, and when the activity is being retrieved directly, but yes, we need to add the same addressing when the object is being retrieved directly. That’ll be the case when this is merged.

I’ll try federating between socialhub and voyager.lemmy.ml when that PR is merged :+1:

3 Likes

@nutomic Something new? I really really want federate some lemmy but i follow it and nothing happen

What do the federation logs show?

2 Likes

When I follow them appear to me as followed but when I refresh page their is gone like never had been followed.

1 Like

yes, i can repro, i have the same issue here

1 Like

@Sammy @sonic You need to contact your instance admin or software maintainer to look into this. I have no idea how Discourse handles this stuff.

1 Like

I’ve been instructed to continue this discussion here, so here I am :slight_smile:

Two thing I noticed that are failing when trying to use lemmy to see discourse

  1. I cannot seem to be able to retrieve a federated thread on lemmy. For example https://meta.discourse.org/ap/object/235d597a789c305cef86318ef84d8762? I tried searching for it but it won’t appear.
  2. Why are some threads in a topic federated, but others not? How can I tell?
2 Likes

Actors are’t making changes in others instances and I can’t delete current actors to recreate this is a bug? It listed my first actor and when i set it again nothing at mastodon.social

The problem with the post you linked is the attributedTo field (which contains the author). It refers to a Group when Lemmy only supports a Person or Service in that position. In fact the object also references the same Group as audience and to, while the Person is not referenced anywhere. When I previously tested federation with socialhub, it correctly specified a Person as attributedTo. So it seems like some kind of bug in Discord.

cc @angus

1 Like

@nutomic That is expected behaviour for a specific configuration of the plugin.

@db0 Basically, if you want to federate with Lemmy your Discourse Actor needs to be configured as “Full Topic”, not “First Post Only”. As mentioned on meta, this will also address other questions you raised.

So the discourse forums are not configured in a way to federate with lemmy? Can this be adjusted? Is there a reason to have this configuration at all if it excludes lemmy?

You mean the meta.discourse.org categories with First Post Only enabled? Yes, they will not currently federate with Lemmy, because as @nutomic noted, Lemmy doesn’t support it.

Yes, the configuration is optimised for announcement-style use cases (which is why it is used on the “Announcements” category on meta.discourse.org). The point of having a Note attributedTo a Group actor (i.e. a Category) is because some folks want to federate content from an Actor that isn’t a specific user. Other folks use this configuration to federate announcements to Mastodon (which supports it).

The goal isn’t to exclude Lemmy, it’s to support a wide variety of use cases. Discourse Actors set up as “Full Topic” will federate with Lemmy as expected. If Lemmy adds support for content attributedTo Group Actors, then “First Post Only” will work with Lemmy too.

Ok well I hope this distinction is made clear for forum admins in the settings, if it works as expected. Is there any forum or post in the meta forums which is set to be compatible with lemmy, so I can test with?

2 Likes

There isn’t one on meta.discourse.org currently, but all of the Category Actors here on socialhub are “Full Topic”.

Yes, I’ll be making a Discourse <> Lemmy How To soon, so your feedback and testing is much appreciated.

2 Likes

I’m not seeing any old posts when opening any of those topics on lemmy (i.e it’s not retrieving historical posts), but ok, maybe this is because it’s a new federation? But at least it’s showing me as subscribed.

However I’m struggling to even find anything that is federated out

Posts either say they were not federated (why?)

Or they don’t say anything at all! I.e. the federation button is completely missing.

1 Like

I’m not sure what the expected behaviour in Lemmy is for dropping in an object link like that. Maybe @nutomic can clarify.

Could be a number of reasons. The category actor may have not been enabled when the post was made.

Most likely because the post was made prior to the category being federated.

Remember federation is not turned on by default and doesn’t automatically federate out everything in a category historically (you can do that with an admin task, but doing it automatically would cause a lot of issues). It’s turned on (and off).

1 Like

That’s what I thought at well, which is why I picked posts opened a couple of days ago. Unless the pplugin was only enabled yesterday or something. I literally cannot find a single thing that is federated. :-/

PS: I also have a suggestion. I think that once the plugin is activated for a category, it should enable federation for all existing posts in that category. That’s not to say it should immediately broadcast them all out, but it should allow external services to retrieve them through search (which normally initiates a GET operation via apub)

1 Like