From 2589b86a8a2ecb63a7900bcd5d628b1552aa258b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 17 Jul 2024 23:19:23 -0500 Subject: [PATCH] EventsDB: fix returning too many rows from tag filters --- src/storages/EventsDB.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/storages/EventsDB.ts b/src/storages/EventsDB.ts index 1265a98b..0f9c7ca2 100644 --- a/src/storages/EventsDB.ts +++ b/src/storages/EventsDB.ts @@ -305,10 +305,8 @@ class EventsDB implements NStore { .execute() .then((rows) => rows.map(({ event_id }) => event_id)); - if (tagIds.length) { - filter.ids = filter.ids ?? []; - filter.ids.push(...tagIds); - } + filter.ids = filter.ids ?? []; + filter.ids.push(...tagIds); for (const [key] of tagEntries) { delete filter[key];