From 4f41be23cc04cf398a6e7fd1adbcb2d593c0b07f Mon Sep 17 00:00:00 2001 From: Thomas Mathews Date: Fri, 30 Dec 2022 17:30:37 -0800 Subject: [PATCH] Added missing icon & fixed single reply no root. --- icon/event-details.svg | 1 + js/core.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 icon/event-details.svg diff --git a/icon/event-details.svg b/icon/event-details.svg new file mode 100644 index 0000000..154f5e4 --- /dev/null +++ b/icon/event-details.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/js/core.js b/js/core.js index a9bd0cd..87f407b 100644 --- a/js/core.js +++ b/js/core.js @@ -147,10 +147,12 @@ async function send_post() { } function new_reply_tags(ev) { - return [ - ["e", ev.id, "", "reply"], - ["p", ev.pubkey], - ]; + const tags = [["e", ev.id, "", "reply"]]; + if (ev.refs.root) { + tags.push(["e", ev.refs.root, "", "root"]); + } + tags.push(["p", ev.pubkey]); + return tags; } async function create_reply(pubkey, content, ev, all=true) {