Adding federation support to Discourse

Bump @how? Or @aschrijver? A log entry of the 500 error that @silverpill is seeing when sending authenticated requests from his platform would help me address this.

I think this requires @how as admin to have a closer look.

1 Like

I made a request to SocialHub actor at 2023-10-06T18:27:04 (UTC).
@angus I can also make request to your testing server, if you have one.

Sorry guys, I was traveling and can only go back 24h. Could you reproduce the failing request @silverpill ?

Unless thereā€™s a way to go through the log files, then I can dig it out.

Iā€™ve made another one at 2023-10-08T18:21:44Z

Check out the newest feature of the Discourse ActivityPub plugin just announced by @angus:

[ā€¦] We just merged the PR that allows a Discourse category to follow any actor in the fediverse, including other Discourse categories. Yes, that means you can now federate a category between two (or three, or more) Discourses. Thereā€™s a few more PRs in the pipeline as part of this phase, but that was a big one.

The post on Discourse Meta has a video demonstrating the feature:

5 Likes

hip hip hip hurray for @angus! :heart_eyes:

2 Likes

I tried it again today and it worked. Also, the delivery of Follow activity was successful (status code 202), but the server didnā€™t send Accept activity back.

An attempt to read activities from outbox results in 500 Internal Server Error.

cc @angus

1 Like

If someone could share the logs with me, Iā€™ll see whatā€™s going on with your requests there (@how)

*edit actually, never-mind, Iā€™m setting up the plugin on https://test.pavilion.tech to make it easier for folks to test and for me to collect the logs. Details to follow shortly.

2 Likes

@silverpill Iā€™ve setup announcements@test.pavilion.tech for testing purposes

If you could make your requests there Iā€™ll pick up the logs and take a closer look. Thanks!

2 Likes

Awesome! I sent a POST request with Follow activity at 2023-12-15T17:53:30 UTC - no Accept so far.

Outbox endpoint works as expected.

1 Like

Thanks! That was helpful. Your issue should be resolved once this is merged

2 Likes

The issue reported in the linked topic arises when the external actor uses an id instead of the full object

Thank you for looking into it! Could you tell me which property it was?

Ah sorry, poorly phrased on my part, itā€™s the object property. A request was being fired (i.e. the instance sending a request to itself), even though you correctly put the local id of the Category Actor there. Iā€™m glad you raised this. I was surprised I hadnā€™t already handled that case properly (i.e. id only in the object of a Follow request; my tests assumed an object in object). Thatā€™s open source for you; someone will quickly find the big simple issue you overlooked. Thanks again.

2 Likes

@silverpill Just to let you know, this PR has been merged.

Iā€™ve just rebuilt test.pavilion.tech so itā€™s running the latest Discourse and Plugin versions. If you have time to test again thatā€™d be much appreciated!

1 Like

I made some adjustments on my side as well, and now follow-accept sequence is working :slight_smile:

1 Like

@angus Iā€™m doing more testing, this time with outboxes.

At SocialHub a GET request to outbox results in 500 Internal Server Error. For example this outbox doesnā€™t work for me: https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a/outbox

The outbox at test.pavilion.tech is working: https://test.pavilion.tech/ap/actor/bfc94e963fef378247b4189820aff273/outbox. I noticed that it contains activities which are usually treated as private, such as Accept, though this might be intentional. It also contains several Create(Note) activities which have Group actor as audience. Are they not Public?

1 Like

SocialHub may need to update to the latest version.

They should federated with the publication collection in cc, albeit I havenā€™t tested this with the outbox itself (just direct delivery).

As weā€™re now at the end of the functionality work to get bi-directional ActivityPub working with Discourse, Iā€™ll soon (early January 2024 at the latest) be publishing both a:

  • contribution guide, for anyone who wants to contribute to the plugin (PRs are welcome); and
  • an ActivityPub guide, for anyone who wants to integrate with the plugin. This will include example activity JSON.

There may be some tweaks in the process of doing the later to ensure weā€™ve crossed Ts dotted Is etc ActivityPub-wise.

Iā€™d also just note that we also recently pushed incoming and outgoing object logging so a site admin can see exactly what objects are being received and being published. SocialHub may want to turn that on for debugging purposes.

@silverpill Iā€™ll have another look at the addressing of activities in the outbox while writing the ActivityPub guide. If you notice anything else like this, or have any suggestions, please let me know.

2 Likes

@silverpill I just upgraded the plugin here.

1 Like

Thanks @how, but outbox endpoints still return 500.

It could be related to the problem you reported in another topic:

1 Like