From 2c3f75437220bb573530728ffe3b9b4506d1badf Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 4 Feb 2026 18:09:06 +0000 Subject: [PATCH 1/2] test: set mvbox_move to 0 for test rust accounts --- src/test_utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test_utils.rs b/src/test_utils.rs index 89adeff3b1..5171e3db04 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -567,6 +567,7 @@ impl TestContext { .unwrap(); ctx.set_config(Config::BccSelf, Some("1")).await.unwrap(); ctx.set_config(Config::SyncMsgs, Some("0")).await.unwrap(); + ctx.set_config(Config::MvboxMove, Some("0")).await.unwrap(); Self { ctx, From 1459ba2e03ee95d558536ee62029a1229fc57408 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 26 Jan 2026 22:35:43 +0000 Subject: [PATCH 2/2] feat: add device message about legacy mvbox_move --- src/sql.rs | 21 +++++++++++++++++++++ src/stock_str.rs | 10 ++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/sql.rs b/src/sql.rs index f0405c0758..bd610e511f 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -9,6 +9,7 @@ use rusqlite::{Connection, OpenFlags, Row, config::DbConfig, types::ValueRef}; use tokio::sync::RwLock; use crate::blob::BlobObject; +use crate::chat::add_device_msg; use crate::config::Config; use crate::constants::DC_CHAT_ID_TRASH; use crate::context::Context; @@ -17,11 +18,13 @@ use crate::ephemeral::start_ephemeral_timers; use crate::imex::BLOBS_BACKUP_NAME; use crate::location::delete_orphaned_poi_locations; use crate::log::{LogExt, warn}; +use crate::message::Message; use crate::message::MsgId; use crate::net::dns::prune_dns_cache; use crate::net::http::http_cache_cleanup; use crate::net::prune_connection_history; use crate::param::{Param, Params}; +use crate::stock_str; use crate::tools::{SystemTime, Time, delete_file, time, time_elapsed}; /// Extension to [`rusqlite::ToSql`] trait @@ -865,6 +868,12 @@ pub async fn housekeeping(context: &Context) -> Result<()> { ); } + maybe_add_mvbox_move_deprecation_message(context) + .await + .context("maybe_add_mvbox_move_deprecation_message") + .log_err(context) + .ok(); + if let Err(err) = incremental_vacuum(context).await { warn!(context, "Failed to run incremental vacuum: {err:#}."); } @@ -924,6 +933,18 @@ pub async fn housekeeping(context: &Context) -> Result<()> { Ok(()) } +/// Adds device message about `mvbox_move` config deprecation +/// if the user has it enabled. +async fn maybe_add_mvbox_move_deprecation_message(context: &Context) -> Result<()> { + if !context.get_config_bool(Config::OnlyFetchMvbox).await? + && context.get_config_bool(Config::MvboxMove).await? + { + let mut msg = Message::new_text(stock_str::mvbox_move_deprecation(context).await); + add_device_msg(context, Some("mvbox_move_deprecation"), Some(&mut msg)).await?; + } + Ok(()) +} + /// Get the value of a column `idx` of the `row` as `Vec`. pub fn row_get_vec(row: &Row, idx: usize) -> rusqlite::Result> { row.get(idx).or_else(|err| match row.get_ref(idx)? { diff --git a/src/stock_str.rs b/src/stock_str.rs index 60f102e7a2..93011a440a 100644 --- a/src/stock_str.rs +++ b/src/stock_str.rs @@ -412,6 +412,11 @@ https://delta.chat/donate"))] #[strum(props(fallback = "Messages in this chat use classic email and are not encrypted."))] ChatUnencryptedExplanation = 230, + + #[strum(props( + fallback = "You are using the legacy option \"Settings → Advanced → Move automatically to DeltaChat Folder\".\n\nThis option will be removed in a few weeks and you should disable it already today.\n\nIf having chat messages mixed into your inbox is a problem, see https://delta.chat/legacy-move" + ))] + MvboxMoveDeprecation = 231, } impl StockMessage { @@ -1223,6 +1228,11 @@ pub(crate) async fn chat_unencrypted_explanation(context: &Context) -> String { translated(context, StockMessage::ChatUnencryptedExplanation).await } +/// Stock string: `You are using the legacy option "Move automatically to DeltaChat Folder`… +pub(crate) async fn mvbox_move_deprecation(context: &Context) -> String { + translated(context, StockMessage::MvboxMoveDeprecation).await +} + impl Viewtype { /// returns Localized name for message viewtype pub async fn to_locale_string(&self, context: &Context) -> String {