From 78f81c02eb23b76dff9beca79cfa522ea379866f Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 29 Sep 2023 12:52:15 +0200 Subject: [PATCH] feat: display mentions as replies (I don't know what's the difference) --- assets/js/webmention-utils.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/js/webmention-utils.mjs b/assets/js/webmention-utils.mjs index fb5b116..0e3cbb2 100644 --- a/assets/js/webmention-utils.mjs +++ b/assets/js/webmention-utils.mjs @@ -3,7 +3,8 @@ export function renderMentions(mentions, rootSelector) { mentions = mentions.filter((m) => m["wm-private"] !== true); if (mentions.filter((m) => m.author.name !== "Ayo Ayco").length) - webMentionsSection.innerHTML = "

From Across the Web

"; + webMentionsSection.innerHTML = + "

From Across the Web

"; const heading = { "like-of": "👍 {x} Likes", @@ -13,7 +14,7 @@ export function renderMentions(mentions, rootSelector) { "in-reply-to": "💬 {x} Replies", }; - ["like-of", "repost-of", "bookmark-of", "mention-of"].forEach((type) => { + ["like-of", "repost-of", "bookmark-of"].forEach((type) => { const mentionsOfType = mentions .filter((m) => m.author.name !== "Ayo Ayco") .filter((m) => m["wm-property"] === type); @@ -24,7 +25,7 @@ export function renderMentions(mentions, rootSelector) { } }); - ["in-reply-to"].forEach((type) => { + ["in-reply-to", "mention-of"].forEach((type) => { const replies = mentions.filter((m) => m["wm-property"] === type); if (replies.length) {