diff options
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r-- | src/imap/mailbox_view.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs index 07fa3ad..85a4961 100644 --- a/src/imap/mailbox_view.rs +++ b/src/imap/mailbox_view.rs @@ -224,6 +224,12 @@ impl MailboxView { Ok((summary, conflict_id_or_uid)) } + pub async fn idle_sync(&mut self) -> Result<Vec<Body<'static>>> { + self.internal.mailbox.notify().await.upgrade().ok_or(anyhow!("test"))?.notified().await; + self.internal.mailbox.opportunistic_sync().await?; + self.update(UpdateParameters::default()).await + } + pub async fn expunge(&mut self) -> Result<Vec<Body<'static>>> { self.internal.sync().await?; let state = self.internal.peek().await; |