diff --git a/js/comments.js b/js/comments.js index c32b13e..15def50 100644 --- a/js/comments.js +++ b/js/comments.js @@ -137,14 +137,11 @@ document.addEventListener("alpine:init", () => { }, }; - // Only add syndication target for the matching platform + // Only add syndication target if one exists for the platform if (this.replyingTo.syndicateTo) { micropubBody.properties["mp-syndicate-to"] = [ this.replyingTo.syndicateTo, ]; - } else { - // IndieWeb webmention — no syndication, empty array - micropubBody.properties["mp-syndicate-to"] = []; } const res = await fetch("/micropub", { diff --git a/js/webmentions.js b/js/webmentions.js index 39f57e9..2604412 100644 --- a/js/webmentions.js +++ b/js/webmentions.js @@ -803,9 +803,12 @@ btn.addEventListener('click', function() { var replyUrl = btn.dataset.replyUrl; var platform = btn.dataset.platform || 'webmention'; + // Map detected platform to syndicator by service.name + var targets = ownerStore.syndicationTargets || {}; var syndicateTo = null; - if (platform === 'bluesky') syndicateTo = ownerStore.syndicationTargets.bluesky || null; - if (platform === 'mastodon') syndicateTo = ownerStore.syndicationTargets.mastodon || null; + if (platform === 'bluesky') syndicateTo = targets['Bluesky'] || null; + if (platform === 'mastodon') syndicateTo = targets['Mastodon'] || null; + if (platform === 'activitypub') syndicateTo = targets['ActivityPub (Fediverse)'] || null; // Close any existing reply form closeActiveReplyForm();