From d419323f12d782199fe3df87dec23cdbc480e78d Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Tue, 18 Jun 2024 14:50:51 +0200 Subject: [PATCH] Fix article note replies --- src/pages/Longform.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/Longform.tsx b/src/pages/Longform.tsx index 61a1b77..d903ab3 100644 --- a/src/pages/Longform.tsx +++ b/src/pages/Longform.tsx @@ -715,17 +715,21 @@ const Longform: Component< { naddr: string } > = (props) => { let id = mention.id; + updateStore('page', 'mentions', + (mentions) => ({ ...mentions, [id]: { ...mention } }) + ); + if (mention.kind === Kind.LongForm) { id = nip19.naddrEncode({ identifier: (mention.tags.find((t: string[]) => t[0] === 'd') || [])[1], pubkey: mention.pubkey, kind: mention.kind, }); - } - updateStore('page', 'mentions', + updateStore('page', 'mentions', (mentions) => ({ ...mentions, [id]: { ...mention } }) ); + } return; }