mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 05:56:31 +03:00
fix: Retry configuring mvbox on IMAP reconnect if mvbox_move is enabled 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.
This commit is contained in:
@@ -1776,14 +1776,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
|
||||
|
||||
Reference in New Issue
Block a user