mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00: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:
commit
8923a5ee55
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue