From fcbbee4034573382d0a7c380684b7eae12cf417f Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Fri, 6 Jan 2023 14:00:59 +0100 Subject: [PATCH] fix: dedupe thread pubkeys --- src/nostr/Thread.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nostr/Thread.js b/src/nostr/Thread.js index 0ebb438..d07b4db 100644 --- a/src/nostr/Thread.js +++ b/src/nostr/Thread.js @@ -41,7 +41,7 @@ export default class Thread { ret.ReplyTo = reply; ret.Mentions = eTags.filter(a => a.Marker === "mention"); } - ret.PubKeys = ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey); + ret.PubKeys = [...new Set(ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey))] return ret; } } \ No newline at end of file