From bb09e255122d79b471fc6ef9e66a5c4a43a9935a Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 1 Jan 2022 21:18:37 -0300 Subject: [PATCH] fix tag in matchFilter for kinds and ids. --- filter.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filter.js b/filter.js index 9ad2b65..f17a48b 100644 --- a/filter.js +++ b/filter.js @@ -1,6 +1,6 @@ export function matchFilter(filter, event) { - if (filter.ids && filter.ids.indexOf(event.id) !== -1) return false - if (filter.kinds && filter.kinds.indexOf(event.kind) !== -1) return false + if (filter.ids && filter.ids.indexOf(event.id) === -1) return false + if (filter.kinds && filter.kinds.indexOf(event.kind) === -1) return false if (filter.authors && filter.authors.indexOf(event.pubkey) === -1) return false diff --git a/package.json b/package.json index 4c73c0c..116fb4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nostr-tools", - "version": "0.16.0", + "version": "0.16.1", "description": "Tools for making a Nostr client.", "repository": { "type": "git",