fix: unknown thread context
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
kieran 2024-04-29 11:01:55 +01:00
parent 76a561624c
commit 08d4a73ca6
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -20,12 +20,11 @@ export function getNotificationContext(ev: TaggedNostrEvent) {
case EventKind.Repost:
case EventKind.Reaction: {
const thread = Nip10.parseThread(ev);
const tag = thread?.replyTo ?? thread?.root;
const tag = thread?.replyTo ?? thread?.root ?? thread?.mentions[0];
if (tag) {
return tag;
} else {
throw new Error("Unknown thread context");
}
break;
}
case EventKind.TextNote: {
return NostrLink.fromEvent(ev);