From 71ee8672f42db3a21d5043879f2387e784ad133b Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Thu, 12 Mar 2026 14:03:37 +0100 Subject: [PATCH] fix: never auto-check Mastodon syndicator for like/repost compose actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/patch-microsub-reader-ap-dispatch.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/patch-microsub-reader-ap-dispatch.mjs b/scripts/patch-microsub-reader-ap-dispatch.mjs index f9e88588..d9a40856 100644 --- a/scripts/patch-microsub-reader-ap-dispatch.mjs +++ b/scripts/patch-microsub-reader-ap-dispatch.mjs @@ -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;", " }", " }",