From bb680be9b740661b51dd7e8882ff29efbcc56cc6 Mon Sep 17 00:00:00 2001 From: Thomas Mathews Date: Fri, 27 Jan 2023 10:38:19 -0800 Subject: [PATCH] Fix issue with posting reactions. --- js/core.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/core.js b/js/core.js index 42622a7..c77f1de 100644 --- a/js/core.js +++ b/js/core.js @@ -138,12 +138,14 @@ function new_reply_tags(ev) { async function create_reply(pubkey, content, ev, all=true) { let kind = ev.kind; - // convert emoji replies into reactions + let tags = []; if (is_valid_reaction_content(content)) { + // convert emoji replies into reactions kind = KIND_REACTION; + tags.push(["e", ev.id], ["p", ev.pubkey]); + } else { + tags = all ? gather_reply_tags(pubkey, ev) : new_reply_tags(ev); } - const tags = kind != KIND_REACTION && all - ? gather_reply_tags(pubkey, ev) : new_reply_tags(ev); const created_at = new_creation_time(); let reply = { pubkey,