From e820d072f5e6bf515221c80a73e7728dcb1ae2cc Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sat, 30 Jan 2021 20:30:18 +0100 Subject: [PATCH] Disable moving to Sentbox for now fix https://github.com/deltachat/deltachat-core-rust/issues/2176 we can re-enable it when DC determines automatically which folders to watch and this is deployed for at least 1 release. --- python/tests/test_account.py | 3 ++- src/config.rs | 3 +++ src/message.rs | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index cd4ddced5..010411df3 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -2251,8 +2251,9 @@ class TestOnlineAccount: Also, the newest existing emails from each folder are fetched during onboarding. - Additionally tests that bcc_self messages moved to the mvbox are marked as read.""" + Additionally tests that bcc_self messages moved to the mvbox/sentbox are marked as read.""" ac1 = acfactory.get_online_configuring_account(mvbox=mvbox_move, move=mvbox_move) + ac1.set_config("sentbox_move", "1") ac2 = acfactory.get_online_configuring_account() acfactory.wait_configure(ac1) diff --git a/src/config.rs b/src/config.rs index e65d27c93..02aff7cff 100644 --- a/src/config.rs +++ b/src/config.rs @@ -63,6 +63,9 @@ pub enum Config { #[strum(props(default = "1"))] MvboxMove, + #[strum(props(default = "0"))] + SentboxMove, // If `MvboxMove` is true, this config is ignored. Currently only used in tests. + #[strum(props(default = "0"))] // also change ShowEmails.default() on changes ShowEmails, diff --git a/src/message.rs b/src/message.rs index 0d45f5eca..fb61ab22f 100644 --- a/src/message.rs +++ b/src/message.rs @@ -119,6 +119,7 @@ impl MsgId { && !msg.is_setupmessage() && msg.to_id != DC_CONTACT_ID_SELF // Leave self-chat-messages in the inbox, not sure about this && context.is_inbox(folder).await + && context.get_config_bool(SentboxMove).await && context.get_config(ConfiguredSentboxFolder).await.is_some() { Ok(Some(ConfiguredSentboxFolder))