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;", " }", " }",