From f4cbf665496640f4ac7cf4ac63ab2beced674978 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 10 Jan 2024 18:38:21 +0100 Subject: Fecth MODSEQ now enables the CONDSTORE capability --- src/imap/command/selected.rs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/imap/command/selected.rs') diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs index ef2654e..24e1f41 100644 --- a/src/imap/command/selected.rs +++ b/src/imap/command/selected.rs @@ -117,14 +117,19 @@ impl<'a> SelectedContext<'a> { uid: &bool, ) -> Result<(Response<'static>, flow::Transition)> { match self.mailbox.fetch(sequence_set, attributes, uid).await { - Ok(resp) => Ok(( - Response::build() - .to_req(self.req) - .message("FETCH completed") - .set_body(resp) - .ok()?, - flow::Transition::None, - )), + Ok((resp, enable_condstore)) => { + if enable_condstore { + self.client_capabilities.enable_condstore(); + } + Ok(( + Response::build() + .to_req(self.req) + .message("FETCH completed") + .set_body(resp) + .ok()?, + flow::Transition::None, + )) + }, Err(e) => Ok(( Response::build() .to_req(self.req) -- cgit v1.2.3