Skip to content

Commit

Permalink
fix: Retry configuring mvbox on IMAP reconnect if mvbox_move is enabl…
Browse files Browse the repository at this point in the history
…ed explicitly

If `mvbox_move` isn't enabled explictly, but only by default, better not to retry configuring it to
avoid excessive work, but if it's enabled explicitly by the user and actually can't be configured,
the user should disable it. But anyway not being able to configure the mvbox doesn't prevent Delta
Chat from working just leaving all mail in Inbox.
  • Loading branch information
iequidoo committed Aug 6, 2024
1 parent 86ad550 commit 0aec3de
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/imap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1625,14 +1625,17 @@ impl Imap {
context
.set_config_internal(Config::ConfiguredInboxFolder, Some("INBOX"))
.await?;
for (config, name) in folder_configs {
context.set_config_internal(config, Some(&name)).await?;
}
if let Some(mvbox_folder) = mvbox_folder {
info!(context, "Setting MVBOX FOLDER TO {}", &mvbox_folder);
context
.set_config_internal(Config::ConfiguredMvboxFolder, Some(mvbox_folder))
.await?;
}
for (config, name) in folder_configs {
context.set_config_internal(config, Some(&name)).await?;
} else if create_mvbox && context.config_exists(Config::MvboxMove).await? {
warn!(context, "Will retry configuring MVBOX on reconnect.");
return Ok(());
}
context
.sql
Expand Down

0 comments on commit 0aec3de

Please sign in to comment.