From 192ee7f76df6e5cf251cb4c6ac7f04dac7c3fefa Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 3 May 2023 21:54:22 -0500 Subject: [PATCH] Make getFilter return a pure event object instead of the class from nostr-relaypool --- src/client.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index be81aa4..9a62424 100644 --- a/src/client.ts +++ b/src/client.ts @@ -33,7 +33,15 @@ function getFilter(filter: Filter, opts: GetFilterOpts = {} poolRelays, (event: SignedEvent | null) => { if (event && matchFilter(filter, event)) { - results.push(event); + results.push({ + id: event.id, + kind: event.kind, + pubkey: event.pubkey, + content: event.content, + tags: event.tags, + created_at: event.created_at, + sig: event.sig, + }); } if (filter.limit && results.length >= filter.limit) { unsub();