mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 02:16:29 +03:00
imap: expunge folder before IDLE if needed
This ensures Inbox is expunged timely in setups that don't watch DeltaChat folder.
This commit is contained in:
committed by
link2xt
parent
d3eb209d27
commit
1e84e81e7d
@@ -74,6 +74,13 @@ async fn inbox_loop(ctx: Context, started: Sender<()>, inbox_handlers: ImapConne
|
||||
}
|
||||
None => {
|
||||
jobs_loaded = 0;
|
||||
|
||||
// Expunge folder if needed, e.g. if some jobs have
|
||||
// deleted messages on the server.
|
||||
if let Err(err) = connection.maybe_close_folder(&ctx).await {
|
||||
warn!(ctx, "failed to close folder: {:?}", err);
|
||||
}
|
||||
|
||||
info = if ctx.get_config_bool(Config::InboxWatch).await {
|
||||
fetch_idle(&ctx, &mut connection, Config::ConfiguredInboxFolder).await
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user