aboutsummaryrefslogtreecommitdiff
path: root/src/imap/mailbox_view.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 17:07:07 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 17:07:07 +0100
commit9cec7803d28617f1bfd1ac1621c2eda9582201d4 (patch)
tree46734d3ae0029f4c725df53d383cf918ccb82a04 /src/imap/mailbox_view.rs
parent96332c9bfe6a9f01e3fdb0b2b565ad669fb526b1 (diff)
downloadaerogramme-9cec7803d28617f1bfd1ac1621c2eda9582201d4.tar.gz
aerogramme-9cec7803d28617f1bfd1ac1621c2eda9582201d4.zip
Implement HIGHESTMODSEQ for STATUS
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r--src/imap/mailbox_view.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index a3d56f0..b3848b2 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -15,7 +15,7 @@ use imap_codec::imap_types::sequence::SequenceSet;
use crate::mail::mailbox::Mailbox;
use crate::mail::query::QueryScope;
use crate::mail::snapshot::FrozenMailbox;
-use crate::mail::uidindex::{ImapUid, ImapUidvalidity};
+use crate::mail::uidindex::{ImapUid, ImapUidvalidity, ModSeq};
use crate::imap::attributes::AttributesProxy;
use crate::imap::flags;
@@ -399,11 +399,15 @@ impl MailboxView {
pub(crate) fn highestmodseq_status(&self) -> Result<Body<'static>> {
Ok(Body::Status(Status::ok(
None,
- Some(Code::Other(CodeOther::unvalidated(format!("HIGHESTMODSEQ {}", self.internal.snapshot.highestmodseq).into_bytes()))),
+ Some(Code::Other(CodeOther::unvalidated(format!("HIGHESTMODSEQ {}", self.highestmodseq()).into_bytes()))),
"Highest",
)?))
}
+ pub(crate) fn highestmodseq(&self) -> ModSeq {
+ self.internal.snapshot.highestmodseq
+ }
+
/// Produce an EXISTS message corresponding to the number of mails
/// in `known_state`
fn exists_status(&self) -> Result<Body<'static>> {