From 8ab1a6779a0839200d55794fc15baaac7f377082 Mon Sep 17 00:00:00 2001 From: mdecimus <11444311+mdecimus@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:25:28 -0300 Subject: [PATCH] Search: Fix filters not applied when a single message is in the account --- crates/store/src/dispatch/search.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/store/src/dispatch/search.rs b/crates/store/src/dispatch/search.rs index 37923f47..c718d7fc 100644 --- a/crates/store/src/dispatch/search.rs +++ b/crates/store/src/dispatch/search.rs @@ -20,14 +20,8 @@ use std::cmp::Ordering; impl SearchStore { pub async fn query_account(&self, query: SearchQuery) -> trc::Result> { // Pre-filter by mask - match query.mask.len().cmp(&1) { - Ordering::Equal => { - return Ok(vec![query.mask.min().unwrap()]); - } - Ordering::Less => { - return Ok(vec![]); - } - Ordering::Greater => {} + if query.mask.is_empty() { + return Ok(vec![]); } // If the store does not support FTS, use the internal FTS store