We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e94c98 commit 496e5e0Copy full SHA for 496e5e0
src/utils/nostr.ts
@@ -21,6 +21,12 @@ export function getEventReplyingTo(event: NDKEvent) {
21
if (replyTag) {
22
return replyTag[1]
23
}
24
+ // If there's a root tag and it's the only e tag (besides mentions),
25
+ // it's a direct reply to the root
26
+ const rootTag = event.tags?.find((tag) => tag[0] === "e" && tag[3] === "root")
27
+ if (rootTag && replyTags.length === 1) {
28
+ return rootTag[1]
29
+ }
30
return undefined
31
32
0 commit comments