EventsDB: fix returning too many rows from tag filters

This commit is contained in:
Alex Gleason 2024-07-17 23:19:23 -05:00
parent c60e62ef8d
commit 2589b86a8a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -305,10 +305,8 @@ class EventsDB implements NStore {
.execute() .execute()
.then((rows) => rows.map(({ event_id }) => event_id)); .then((rows) => rows.map(({ event_id }) => event_id));
if (tagIds.length) {
filter.ids = filter.ids ?? []; filter.ids = filter.ids ?? [];
filter.ids.push(...tagIds); filter.ids.push(...tagIds);
}
for (const [key] of tagEntries) { for (const [key] of tagEntries) {
delete filter[key]; delete filter[key];