ActivityPub embed assumes Mastodon when no /api/v2/instance endpoint is available

(#4916) Bug Open: Needs triage embeds

Reproduction steps

  1. Post a link to a federated remote ActivityPub post (example: a mastodon.social post, linked from ap.fruity.website)
  2. Check the footer of the embedded post

Expected behaviour

I'm not sure what the intended behavior is for the footer, but if it's meant to show the original instance the post belongs to, then I would expect it to always display the name/host of the ActivityPub actor, not that of the link. If it is intended to show the name of the instance that the link actually points to, then I would expect it to state the name/host of the instance and not assume that it's Mastodon in the event it can't get the title.

Actual behaviour

If it's meant to show the original instance the post belongs to: On software that serves its own version of the federated note and supports /api/v2/instance, it'll show the name of the linked server hosting that copy, not the home server of the ActivityPub actor. If this is the intended behavior, then I believe this is somewhat related to #4914, where it is using the URL in the message rather than the URL of the ActivityPub actor when checking for the instance information. If it's intended to show the name of the linked instance: If said instance doesn't support the /api/v2/instance endpoint, then it falls back to the clean host with " Mastodon" added to the end, even if it's not a Mastodon instance. This applies to Misskey and Sharkey. If it does support the /api/v2/instance endpoint, then it seems fine (see the Xenofem (Pleroma) and Catodon examples below).

Build information

Canary Desktop 2026.1116.70910, Web 2026.1117.140332, Linux 7.2.12+deb13-amd64 (x64), Electron 44.10.0, Chrome 152.0.7977.169, Node 24.22.1, Locale en-US

Platform

API, Self-hosting

Evidence

In the example image there are four links, pointing to different versions of the same post by the Fluxer account. The first one is the original, so it displays as I would expect. https://social.fluxer.com/@fluxer/statuses/01M6Y29W3SVQRFRRMSDN655XDN The second one is linked from mastodon.social, which, as far as I know, redirects you to the original instance, so that one looks fine. https://mastodon.social/@fluxer@fluxer.com/117581932142482080 The third one is from my instance, running Sharkey, which does not have an /api/v2/instance endpoint. It falls back to the host ap.fruity.website, but adds " Mastodon" to the end, which is inaccurate. This also applies to upstream Misskey. https://ap.fruity.website/notes/atbnlo8oz21s1zzg The fourth one is from Xenofem.me, which does have an /api/v2/instance endpoint, so it shows just "Xenofem.me" in the footer. Two other examples I have, not in the screenshot, are Catodon and upstream Misskey. Misskey, as mentioned, does not have the endpoint it checks and thus says "misskey.io Mastodon". Catodon (which is a fork of Sharkey) has added an /api/v2/instance endpoint, so that one appears just as "Catodon rocks" in the footer. Both of these links point to that same post about an F-Droid release. Misskey link example: https://misskey.io/notes/atbnlo8o1cup01mt Catodon link example: https://catodon.rocks/notes/atbnlo8oztoc08x7 The " Mastodon" suffix appended to Sharkey and Misskey embeds appear to come from line 144 in fluxer/fluxer_unfurl/src/activity_pub/mod.rs.

Comments

Sign in with Fluxer to comment and vote.

No comments yet.