feat: use replyTargets config for platform-to-syndicator mapping

- Frontend now reads replyTargets from isOwner API to resolve which
  syndicator handles replies for each platform
- Build-time reply buttons get platform from URL heuristics as fallback
- enrichBuildTimeBadges upgrades to NodeInfo-resolved platform at runtime
This commit is contained in:
Ricardo
2026-03-26 08:21:54 +01:00
parent dcd73b1897
commit 34fdab4b85
3 changed files with 18 additions and 6 deletions

View File

@@ -153,9 +153,19 @@
<div class="text-surface-700 dark:text-surface-300 prose dark:prose-invert prose-sm max-w-none">
{{ reply.content.html | safe if reply.content.html else reply.content.text }}
</div>
{% set replySource = reply['wm-source'] | default('', true) %}
{% set replyAuthorUrl = reply.author.url | default('', true) %}
{% set buildPlatform = 'webmention' %}
{% if 'bsky.app' in replyAuthorUrl or ('brid.gy/' in replySource and '/bluesky/' in replySource) %}
{% set buildPlatform = 'bluesky' %}
{% elif 'brid.gy/' in replySource and '/mastodon/' in replySource %}
{% set buildPlatform = 'mastodon' %}
{% elif 'fed.brid.gy' in replySource %}
{% set buildPlatform = 'activitypub' %}
{% endif %}
<button class="wm-reply-btn hidden text-xs text-primary-600 dark:text-primary-400 hover:underline mt-2"
data-reply-url="{{ reply.url }}"
data-platform="">
data-platform="{{ buildPlatform }}">
Reply
</button>
</div>