From fbf2e9aa9670c991f5384350b2c78ad38dc3baf8 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 11 Jan 2024 11:48:02 +0100 Subject: Enable CONDSTORE if SEARCH MODSEQ is queried --- src/imap/command/examined.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/imap/command/examined.rs') diff --git a/src/imap/command/examined.rs b/src/imap/command/examined.rs index ef5cecc..bb05250 100644 --- a/src/imap/command/examined.rs +++ b/src/imap/command/examined.rs @@ -120,7 +120,10 @@ impl<'a> ExaminedContext<'a> { criteria: &SearchKey<'a>, uid: &bool, ) -> Result<(Response<'static>, flow::Transition)> { - let found = self.mailbox.search(charset, criteria, *uid).await?; + let (found, enable_condstore) = self.mailbox.search(charset, criteria, *uid).await?; + if enable_condstore { + self.client_capabilities.enable_condstore(); + } Ok(( Response::build() .to_req(self.req) -- cgit v1.2.3