mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
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:
@@ -23,14 +23,6 @@ impl Session {
|
|||||||
) -> Result<(Self, InterruptInfo)> {
|
) -> Result<(Self, InterruptInfo)> {
|
||||||
use futures::future::FutureExt;
|
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();
|
let mut info = Default::default();
|
||||||
|
|
||||||
self.select_folder(context, Some(folder)).await?;
|
self.select_folder(context, Some(folder)).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user