From 8aaa5103c41baf069480211feaddf41e8d6554eb Mon Sep 17 00:00:00 2001 From: Kieran Date: Thu, 29 Dec 2022 16:19:16 +0000 Subject: [PATCH] Fix mention parsing --- src/nostr/Connection.js | 1 + src/nostr/Thread.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/nostr/Connection.js b/src/nostr/Connection.js index 0b9daa09..9f460733 100644 --- a/src/nostr/Connection.js +++ b/src/nostr/Connection.js @@ -93,6 +93,7 @@ export default class Connection { AddSubscription(sub) { let subObj = sub.ToObject(); if (Object.keys(subObj).length === 0) { + debugger; throw "CANNOT SEND EMPTY SUB - FIX ME"; } let req = ["REQ", sub.Id, subObj]; diff --git a/src/nostr/Thread.js b/src/nostr/Thread.js index 556dbefc..339f4893 100644 --- a/src/nostr/Thread.js +++ b/src/nostr/Thread.js @@ -39,6 +39,7 @@ export default class Thread { let reply = eTags.find(a => a.Marker === "reply"); ret.Root = root; ret.ReplyTo = reply; + ret.Mentions = eTags.filter(a => a.Marker === "mention"); } ret.PubKeys = ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey);