empty_server: use configured inbox instead of hardcoded "INBOX"

This commit is contained in:
Alexander Krotov
2020-07-26 23:53:56 +03:00
parent 0202ed7ca8
commit dafe900d22

View File

@@ -633,7 +633,9 @@ impl Job {
}
}
if self.foreign_id & DC_EMPTY_INBOX > 0 {
imap.empty_folder(context, "INBOX").await;
if let Some(inbox_folder) = &context.get_config(Config::ConfiguredInboxFolder).await {
imap.empty_folder(context, &inbox_folder).await;
}
}
Status::Finished(Ok(()))
}