diff --git a/eleventy.config.js b/eleventy.config.js index 3e8fcf9..47ac06d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -878,7 +878,17 @@ export default function (eleventyConfig) { authorActions.add(key); deduped.push(wm); } - return deduped; + + // Filter out self-interactions from own Bluesky account + const isSelfBsky = (wm) => { + const u = (wm.url || "").toLowerCase(); + const a = (wm.author?.url || "").toLowerCase(); + return u.includes("bsky.app/profile/svemagie.bsky.social") || + u.includes("did:plc:g4utqyolpyb5zpwwodmm3hht") || + a.includes("bsky.app/profile/svemagie.bsky.social") || + a.includes("did:plc:g4utqyolpyb5zpwwodmm3hht"); + }; + return deduped.filter((wm) => !isSelfBsky(wm)); }); eleventyConfig.addFilter("webmentionsByType", function (mentions, type) { diff --git a/js/webmentions.js b/js/webmentions.js index 39f57e9..310bf56 100644 --- a/js/webmentions.js +++ b/js/webmentions.js @@ -52,12 +52,21 @@ } } + function isSelfBsky(wm) { + var u = (wm.url || '').toLowerCase(); + var a = ((wm.author && wm.author.url) || '').toLowerCase(); + return u.includes('bsky.app/profile/svemagie.bsky.social') || + u.includes('did:plc:g4utqyolpyb5zpwwodmm3hht') || + a.includes('bsky.app/profile/svemagie.bsky.social') || + a.includes('did:plc:g4utqyolpyb5zpwwodmm3hht'); + } + function processWebmentions(allChildren) { if (!allChildren || !allChildren.length) return; // Separate owner replies (threaded under parent) from regular interactions var ownerReplies = allChildren.filter(function(wm) { return wm.is_owner && wm.parent_url; }); - var regularItems = allChildren.filter(function(wm) { return !wm.is_owner; }); + var regularItems = allChildren.filter(function(wm) { return !wm.is_owner && !isSelfBsky(wm); }); let mentionsToShow; if (hasBuildTimeSection) {