fix: replyToThis bug

This commit is contained in:
Kieran 2023-11-14 13:33:54 +00:00
parent 7174ed2502
commit a2d084ab70
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@snort/system",
"version": "1.1.2",
"version": "1.1.3",
"description": "Snort nostr system package",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -82,7 +82,7 @@ export class NostrLink implements ToNostrEventTag {
isReplyToThis(ev: NostrEvent) {
const NonNip10Kinds = [EventKind.Reaction, EventKind.Repost, EventKind.ZapReceipt];
if (NonNip10Kinds.includes(ev.kind)) {
const lastRef = ev.tags.findLast(a => a[0] === "e" || a[1] === "a");
const lastRef = ev.tags.findLast(a => a[0] === "e" || a[0] === "a");
if (!lastRef) return false;
if (