mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
fix: frontend reply syndication mapping and empty array cleanup
- Map platform to syndicator using service.name keys from isOwner API - Add activitypub platform mapping (was completely missing) - Remove empty mp-syndicate-to array for webmention replies (caused permanent no-op entries in syndication queue)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user