diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-11 11:48:02 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-11 11:48:02 +0100 |
commit | fbf2e9aa9670c991f5384350b2c78ad38dc3baf8 (patch) | |
tree | 51555e9c3371622fefd854c89ce887a8814fa0e1 /src/imap/mailbox_view.rs | |
parent | 917c32ae0b6fa3161cebdfeec748b2db0bbc1c70 (diff) | |
download | aerogramme-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.rs | 7 |
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)) } // ---- |