aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command/examined.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 18:38:21 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 18:38:21 +0100
commitf4cbf665496640f4ac7cf4ac63ab2beced674978 (patch)
tree1bf25a04be2f067271cad9ad48fc98633cd34dfb /src/imap/command/examined.rs
parentf5b73182f25dfdcdc34f7b3c6664c5112ce93c1c (diff)
downloadaerogramme-f4cbf665496640f4ac7cf4ac63ab2beced674978.tar.gz
aerogramme-f4cbf665496640f4ac7cf4ac63ab2beced674978.zip
Fecth MODSEQ now enables the CONDSTORE capability
Diffstat (limited to 'src/imap/command/examined.rs')
-rw-r--r--src/imap/command/examined.rs21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/imap/command/examined.rs b/src/imap/command/examined.rs
index 4767340..ef5cecc 100644
--- a/src/imap/command/examined.rs
+++ b/src/imap/command/examined.rs
@@ -91,14 +91,19 @@ impl<'a> ExaminedContext<'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)