fix: never auto-check Mastodon syndicator for like/repost compose actions

The site is its own fediverse actor (@svemagie@blog.giersig.eu). Likes and
reposts send native AP Like/Announce activities directly — troet.cafe has
no role in site-level interaction actions. Mastodon is now only auto-selected
in the compose form for fediverse *replies*, not likes or reposts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-12 14:03:37 +01:00
parent 77dd85b507
commit 71ee8672f4

View File

@@ -51,7 +51,11 @@ const patchSpecs = [
" }",
].join("\n"),
newSnippet: [
" if (interactionUrl && syndicationTargets.length > 0) {",
" // Auto-select syndication target based on interaction URL protocol.",
" // Likes and reposts are handled natively by the AP endpoint (@svemagie@blog.giersig.eu)",
" // — never auto-check Mastodon for those action types.",
" const isLikeOrRepost = !!(likeOf || like || repostOf || repost);",
" if (interactionUrl && syndicationTargets.length > 0 && !isLikeOrRepost) {",
" const protocol = detectProtocol(interactionUrl);",
"",
" // Build set of Mastodon instance hostnames from configured targets so we can",
@@ -76,9 +80,7 @@ const patchSpecs = [
" if (protocol === \"atmosphere\" && (targetId.includes(\"bluesky\") || targetId.includes(\"bsky\"))) {",
" target.checked = true;",
" } else if (isMastodonTarget && (protocol === \"fediverse\" || mastodonHostnames.has(interactionHostname))) {",
" // Auto-check Mastodon when:",
" // - the URL is from a known fediverse instance (mastodon.social, fosstodon.org, …)",
" // - OR the URL is from the same instance as our Mastodon syndicator (e.g. troet.cafe)",
" // Auto-check Mastodon for fediverse replies only (not likes/reposts — those use AP)",
" target.checked = true;",
" }",
" }",