From 5dfa02e381154c03adee33262e247797d9a2f8ff Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 9 Jan 2024 16:53:32 +0100 Subject: Disable UNSEEN again as it was a volunteer decision to not implement it --- src/imap/capability.rs | 2 +- src/imap/command/authenticated.rs | 1 + src/imap/mailbox_view.rs | 6 ++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/imap/capability.rs b/src/imap/capability.rs index feadb6b..21b95cb 100644 --- a/src/imap/capability.rs +++ b/src/imap/capability.rs @@ -26,7 +26,7 @@ impl Default for ServerCapability { Capability::Move, Capability::LiteralPlus, capability_unselect(), - //capability_condstore(), + capability_condstore(), //capability_qresync(), ])) } diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs index 1481a80..8e5b2e6 100644 --- a/src/imap/command/authenticated.rs +++ b/src/imap/command/authenticated.rs @@ -404,6 +404,7 @@ impl<'a> AuthenticatedContext<'a> { it is therefore correct to not return it even if there are unseen messages RFC9051 (imap4rev2) says that OK [UNSEEN] responses are deprecated after SELECT and EXAMINE For Aerogramme, we just don't send the OK [UNSEEN], it's correct to do in both specifications. + 20 select "INBOX.achats" * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded JUNK $label1) diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs index 513567f..e9f85a6 100644 --- a/src/imap/mailbox_view.rs +++ b/src/imap/mailbox_view.rs @@ -130,8 +130,8 @@ impl MailboxView { data.extend(self.flags_status()?.into_iter()); data.push(self.uidvalidity_status()?); data.push(self.uidnext_status()?); - self.unseen_first_status()? - .map(|unseen_status| data.push(unseen_status)); + /*self.unseen_first_status()? + .map(|unseen_status| data.push(unseen_status));*/ Ok(data) } @@ -403,6 +403,7 @@ impl MailboxView { Ok(Body::Data(Data::Recent(self.recent()?))) } + #[allow(dead_code)] fn unseen_first_status(&self) -> Result>> { Ok(self .unseen_first()? @@ -412,6 +413,7 @@ impl MailboxView { .transpose()?) } + #[allow(dead_code)] fn unseen_first(&self) -> Result> { Ok(self .0 -- cgit v1.2.3