fix idle mode notifications (#48)

This commit is contained in:
Clément DOUIN
2021-04-17 00:00:52 +02:00
parent 1c6f249ca4
commit f3a67cecd5
5 changed files with 82 additions and 37 deletions
+2
View File
@@ -1,5 +1,6 @@
use clap::{self, App, ArgMatches, SubCommand};
use error_chain::error_chain;
use log::debug;
use crate::{config::model::Config, imap::model::ImapConnector};
@@ -20,6 +21,7 @@ pub fn imap_matches(matches: &ArgMatches) -> Result<bool> {
let mbox = matches.value_of("mailbox").unwrap();
if let Some(_) = matches.subcommand_matches("idle") {
debug!("[imap::cli] idle command matched");
let mut imap_conn = ImapConnector::new(&account)?;
imap_conn.idle(&config, &mbox)?;
imap_conn.logout();