aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command/selected.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap/command/selected.rs')
-rw-r--r--src/imap/command/selected.rs21
1 files changed, 13 insertions, 8 deletions
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)