mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-14 11:04:18 +01:00
Merge branch 'eventsdb-no-ephemeral' into 'main'
EventsDB: remove queries for ephemeral kinds See merge request soapbox-pub/ditto!409
This commit is contained in:
@@ -279,6 +279,12 @@ class EventsDB implements NStore {
|
||||
|
||||
filter.search = tokens.filter((t) => typeof t === 'string').join(' ');
|
||||
}
|
||||
|
||||
if (filter.kinds) {
|
||||
// Ephemeral events are not stored, so don't bother querying for them.
|
||||
// If this results in an empty kinds array, NDatabase will remove the filter before querying and return no results.
|
||||
filter.kinds = filter.kinds.filter((kind) => !NKinds.ephemeral(kind));
|
||||
}
|
||||
}
|
||||
|
||||
return filters;
|
||||
|
||||
Reference in New Issue
Block a user