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))