From 47c12fed5049ac2460d4679c94d1f032e407719b Mon Sep 17 00:00:00 2001 From: w3irdrobot Date: Fri, 24 Feb 2023 12:49:33 -0500 Subject: [PATCH] Update thread detection to not include mentions Noticed 're:' was being added to notes in the UI when it only mentioned a note. This didn't constitute a thread and shouldn't attempt to add who it is replying to in the UI since there wasn't a reply to display. This simply makes sure that a thread is detected when there is an 'e' tag and the marker for the tag is not a mention. --- packages/nostr/src/legacy/Thread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nostr/src/legacy/Thread.ts b/packages/nostr/src/legacy/Thread.ts index b753ac0..70aaab2 100644 --- a/packages/nostr/src/legacy/Thread.ts +++ b/packages/nostr/src/legacy/Thread.ts @@ -19,7 +19,7 @@ export default class Thread { * @param ev Event to extract thread from */ static ExtractThread(ev: NEvent) { - const isThread = ev.Tags.some((a) => a.Key === "e"); + const isThread = ev.Tags.some((a) => a.Key === "e" && a.Marker !== "mention"); if (!isThread) { return null; }