aboutsummaryrefslogtreecommitdiff
path: root/src/imap/mailbox_view.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-11 11:48:02 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-11 11:48:02 +0100
commitfbf2e9aa9670c991f5384350b2c78ad38dc3baf8 (patch)
tree51555e9c3371622fefd854c89ce887a8814fa0e1 /src/imap/mailbox_view.rs
parent917c32ae0b6fa3161cebdfeec748b2db0bbc1c70 (diff)
downloadaerogramme-fbf2e9aa9670c991f5384350b2c78ad38dc3baf8.tar.gz
aerogramme-fbf2e9aa9670c991f5384350b2c78ad38dc3baf8.zip
Enable CONDSTORE if SEARCH MODSEQ is queried
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r--src/imap/mailbox_view.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index 61beed5..ecdd745 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -325,7 +325,7 @@ impl MailboxView {
_charset: &Option<Charset<'a>>,
search_key: &SearchKey<'a>,
uid: bool,
- ) -> Result<Vec<Body<'static>>> {
+ ) -> Result<(Vec<Body<'static>>, bool)> {
// 1. Compute the subset of sequence identifiers we need to fetch
// based on the search query
let crit = search::Criteria(search_key);
@@ -354,7 +354,10 @@ impl MailboxView {
_ => final_selection.map(|in_idx| in_idx.i).collect(),
};
- Ok(vec![Body::Data(Data::Search(selection_fmt))])
+ // 7. Add the modseq entry if needed
+ let is_modseq = crit.is_modseq();
+
+ Ok((vec![Body::Data(Data::Search(selection_fmt))], is_modseq))
}
// ----