Why are supposedly ActivityPub-federated Discourse threads inaccessible via external AP clients?

Example

If I enter https://meta.discourse.org/t/uris-to-the-origin-of-a-thread-that-has-since-been-merged-should-503-to-the-merged-comment/342417?u=rokejulianlockhart (or https://meta.discourse.org/ap/object/bc8f042ccca5ef56734c5f2460aa45cc) [1] into mastodon.social/search, it 404s: [2] [3]

If this isn’t Discourse’s fault, I’ll take this to Mastodon. However, most other AP platforms that I’ve tried (that I’ve expected to work) have worked.


  1. https://meta.discourse.org/t/uris-to-the-origin-of-a-thread-that-has-since-been-merged-should-503-to-the-merged-comment/342417?u=rokejulianlockhart ↩︎

  2. search?q=https%3A%2F%2Fmeta.discourse.org%2Fap%2Fobject%2Fbc8f042ccca5ef56734c5f2460aa45cc ↩︎

  3. search?q=https%3A%2F%2Fmeta.discourse.org%2Ft%2Furis-to-the-origin-of-a-thread-that-has-since-been-merged-should-503-to-the-merged-comment%2F342417%3Fu%3Drokejulianlockhart ↩︎

1 Like

I’m missing this as well. Without this, it is hard or impossible to interact with federated posts unless they are in your timeline already.

@rokejulianlockhart, just curious, have you tried with URLs of WordPress instances using the WP ActivityPub plugin?

2 Likes

What the heck has occurred here? I have never written like the undermentioned:

RokeJulianLockhart:

Discuss this on our forum.

...and someone's taken a sledgehammer to my markup.

1 Like

Oh! They’re federated now! I didn’t post that comment here. [1] They’re merely rather broken in their federation:

  1. The formatting isn’t conserved.

  2. I am able to like my own posts.

    It’s a separate user account, since it’s registered on another domain.

@icaria36, no. Do you know of any?


  1. socialhub.activitypub.rocks/t/5123/3 ↩︎

I believe this is a WordPress site, and I just tested with a recent article, and I can find the URL on Mastodon indeed: Nature Holds Awe, Man – NHAM Mixtape 11 – NHAM

@icaria36, I don’t think so. Discourse has native AP integration.

@rokejulianlockhart To your point when you created this topic, meanwhile, https://meta.discourse.org/t/why-are-supposedly-activitypub-federated-discourse-threads-inaccessible-via-external-ap-clients/356997 cannot be found on Mastodon.

1 Like

@icaria36, it’s probably a fault of Mastodon’s, then, since Discourse federates it:

1 Like

github.com/mastodon/mastodon/discussions/34600#discussioncomment-13031935 states:

The Discourse AP plugin makes ActivityPub objects available when you click the green ActivityPub logo and click the “Note” button to copy the URL: Why are supposedly ActivityPub-federated Discourse threads inaccessible via external AP clients? - #9 by rokejulianlockhart - Support - Discourse Meta

Discourse AP needs to make the url link back to the id in some way, preferably via a redirect on requests with the correct Accept content negotiation header.

Consequently, I’ll tentatively set this as a Bug. (I can’t. Too old.)

But the URLs provided by the “Notes” icon don’t throw any results when pasted on i.e. mastodon.social/search.

Problem not solved.

1 Like

@icaria36, please comment that on the GitHub Discussion. Having someone else challenge the response lends some more credibility than having me be the liason.

1 Like

Looks like that:

1 Like

Well, no, it seems that it might be a Discourse bug after all: Posts from Discourse do not resolve via the Search API · Issue #34632 · mastodon/mastodon · GitHub

Investigating a bit more, Mastodon requests the resource with the following Accept header:

Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", text/html;q=0.1

Querying discourse with this results in the HTTP 400 response.

Omitting the text/html;q=0.1 returns an ActivityStreams object. So this seems to be a bug with Discourse, which seems to return a 400 anytime text/html is part of the accepted types…