From 6e9147af5e0b3a805000f711ab94288133c311f7 Mon Sep 17 00:00:00 2001 From: svemagie Date: Mon, 20 Apr 2026 18:01:02 +0200 Subject: [PATCH] fix: activate mastodon thread for all AP posts, add x-show for empty-state --- _includes/components/webmentions.njk | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/_includes/components/webmentions.njk b/_includes/components/webmentions.njk index fe819c0..8e940ae 100644 --- a/_includes/components/webmentions.njk +++ b/_includes/components/webmentions.njk @@ -22,7 +22,8 @@ {% endfor %} {% endif %} -{% if mentions.length or bskySyndUrl %} +{% set mastodonInstance = site.feeds.mastodon.instance %} +{% if mentions.length or bskySyndUrl or mastodonInstance %}

Interactions ({{ mentions.length }}) @@ -121,14 +122,9 @@ {# Replies — webmention replies merged with Bluesky + Mastodon/AP threads (deduplicated) #} {% set wm_replies = mentions | webmentionsByType('replies') %} - {# Detect Mastodon/AP activity: check if any webmention reply came via fed.brid.gy #} - {% set mastodonInstance = site.feeds.mastodon.instance %} + {# Activate Mastodon/AP thread fetching when instance is configured #} {% set apIdentity = site.fediverseCreator %} - {% set hasApReplies = false %} - {% for reply in wm_replies %} - {% if 'fed.brid.gy' in reply['wm-source'] | default('') %}{% set hasApReplies = true %}{% endif %} - {% endfor %} - {% set mastodonActive = mastodonInstance and hasApReplies %} + {% set mastodonActive = mastodonInstance %} {% set replyComponentActive = bskySyndUrl or mastodonActive %} {# Filter: remove Bluesky-sourced webmentions if bskySyndUrl; remove fed.brid.gy webmentions if mastodonActive #} @@ -145,7 +141,7 @@ {% if filtered_replies.length or replyComponentActive %} {% set wmRepliesCount = filtered_replies.length %} -
+

{% if not replyComponentActive %}{{ wmRepliesCount }} Repl{% if wmRepliesCount != 1 %}ies{% else %}y{% endif %}{% endif %}