Search: Fix filters not applied when a single message is in the account

This commit is contained in:
mdecimus
2026-01-14 20:25:28 -03:00
parent 887ab71314
commit 8ab1a6779a

View File

@@ -20,15 +20,9 @@ use std::cmp::Ordering;
impl SearchStore {
pub async fn query_account(&self, query: SearchQuery) -> trc::Result<Vec<u32>> {
// Pre-filter by mask
match query.mask.len().cmp(&1) {
Ordering::Equal => {
return Ok(vec![query.mask.min().unwrap()]);
}
Ordering::Less => {
if query.mask.is_empty() {
return Ok(vec![]);
}
Ordering::Greater => {}
}
// If the store does not support FTS, use the internal FTS store
if let Some(store) = self.internal_fts() {