refactor(imap): do not check if IDLE is supported twice

We already check if IDLE is supported outside of idle()
This commit is contained in:
link2xt
2023-11-10 03:02:45 +00:00
parent b2ea8f54df
commit 765c95de39

View File

@@ -23,14 +23,6 @@ impl Session {
) -> Result<(Self, InterruptInfo)> {
use futures::future::FutureExt;
if context.get_config_bool(Config::DisableIdle).await? {
bail!("IMAP IDLE is disabled");
}
if !self.can_idle() {
bail!("IMAP server does not have IDLE capability");
}
let mut info = Default::default();
self.select_folder(context, Some(folder)).await?;