From 2a2d4f68ac9aa46911541e02b300568c351a002c Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Wed, 18 Mar 2026 08:04:28 +0100 Subject: [PATCH] feat: filter self-Bluesky interactions from sidebar webmentions widget Apply the same isSelfBsky() filter already used in post-interactions.njk to the sidebar webmentions widget, hiding own Bluesky account entries from both the conversations and webmentions merge loops. Co-Authored-By: Claude Sonnet 4.6 --- _includes/components/widgets/webmentions.njk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_includes/components/widgets/webmentions.njk b/_includes/components/widgets/webmentions.njk index 95dd683..92d4e1a 100644 --- a/_includes/components/widgets/webmentions.njk +++ b/_includes/components/widgets/webmentions.njk @@ -135,14 +135,26 @@ function webmentionsWidget() { const wmData = wmRes?.ok ? await wmRes.json() : { children: [] }; const convData = convRes?.ok ? await convRes.json() : { children: [] }; + // Skip self-interactions from own Bluesky account + const isSelfBsky = (item) => { + const u = (item.url || '').toLowerCase(); + const a = ((item.author && item.author.url) || '').toLowerCase(); + return u.includes('did:plc:g4utqyolpyb5zpwwodmm3hht') || + u.includes('bsky.app/profile/svemagie.bsky.social') || + a.includes('did:plc:g4utqyolpyb5zpwwodmm3hht') || + a.includes('bsky.app/profile/svemagie.bsky.social'); + }; + // Merge: conversations items first (richer metadata), then webmentions const seen = new Set(); const merged = []; for (const item of (convData.children || [])) { + if (isSelfBsky(item)) continue; const key = item['wm-id'] || item.url; if (key && !seen.has(key)) { seen.add(key); merged.push(item); } } for (const item of (wmData.children || [])) { + if (isSelfBsky(item)) continue; const key = item['wm-id']; if (!key || seen.has(key)) continue; if (item.url && seen.has(item.url)) continue;