From 746021d40a4f11f45f7f7950c77643f37381698f Mon Sep 17 00:00:00 2001 From: kieran Date: Wed, 1 May 2024 18:22:11 +0100 Subject: [PATCH] fix: isReplyToThis --- packages/system/src/nostr-link.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/system/src/nostr-link.ts b/packages/system/src/nostr-link.ts index 43387b2d..e14823cd 100644 --- a/packages/system/src/nostr-link.ts +++ b/packages/system/src/nostr-link.ts @@ -127,7 +127,7 @@ export class NostrLink implements ToNostrEventTag { if (NonNip10Kinds.includes(ev.kind)) { const links = removeUndefined(ev.tags.filter(a => a[0] === "e" || a[0] === "a").map(a => NostrLink.fromTag(a))); if (links.length === 0) return false; - return links.some(a => a.matchesEvent(ev)); + return links.some(a => a.equals(this)); } else { const thread = EventExt.extractThread(ev); if (!thread) return false; // non-thread events are not replies @@ -177,8 +177,7 @@ export class NostrLink implements ToNostrEventTag { } equals(other: NostrLink) { - if (other.type === this.type && this.type === NostrPrefix.Address) { - } + return other.tagKey === this.tagKey; } static fromTag(tag: Array, author?: string, kind?: number) {