diff --git a/deltachat-rpc-client/tests/test_folders.py b/deltachat-rpc-client/tests/test_folders.py index 85cd8e110..6b0ab9abd 100644 --- a/deltachat-rpc-client/tests/test_folders.py +++ b/deltachat-rpc-client/tests/test_folders.py @@ -11,6 +11,7 @@ def test_moved_markseen(acfactory, direct_imap, log): addr, password = acfactory.get_credentials() ac2 = acfactory.get_unconfigured_account() + ac2.set_config("bcc_self", "1") ac2.add_or_update_transport({"addr": addr, "password": password}) ac2.bring_online() @@ -60,8 +61,8 @@ def test_markseen_message_and_mdn(acfactory, direct_imap): for ac in ac1, ac2: ac.set_config("delete_server_after", "0") - # Do not send BCC to self, we only want to test MDN on ac1. - ac1.set_config("bcc_self", "0") + # For ac1, we only want to test MDN. + ac2.set_config("bcc_self", "1") acfactory.get_accepted_chat(ac1, ac2).send_text("hi") msg = ac2.wait_for_incoming_msg() diff --git a/deltachat-rpc-client/tests/test_multidevice.py b/deltachat-rpc-client/tests/test_multidevice.py index 0ccbd6564..28d28683e 100644 --- a/deltachat-rpc-client/tests/test_multidevice.py +++ b/deltachat-rpc-client/tests/test_multidevice.py @@ -79,7 +79,6 @@ def test_one_account_send_bcc_setting(acfactory, log, direct_imap): # now make sure we are sending message to ourselves too assert self_addr in ev.msg - assert self_addr in ev.msg # BCC-self messages are marked as seen by the sender device. while True: diff --git a/python/tests/test_1_online.py b/python/tests/test_1_online.py index 236da0cea..a36e9f797 100644 --- a/python/tests/test_1_online.py +++ b/python/tests/test_1_online.py @@ -160,6 +160,7 @@ def test_html_message(acfactory, lp): def test_webxdc_message(acfactory, data, lp): ac1, ac2 = acfactory.get_online_accounts(2) + ac2.set_config("bcc_self", "1") chat = acfactory.get_accepted_chat(ac1, ac2) lp.sec("ac1: prepare and send text message to ac2") @@ -362,6 +363,8 @@ def test_send_and_receive_message_markseen(acfactory, lp): # make DC's life harder wrt to encodings ac1.set_config("displayname", "รค name") + ac2.set_config("bcc_self", "1") + # clear any fresh device messages ac1.get_device_chat().mark_noticed() ac2.get_device_chat().mark_noticed() @@ -502,9 +505,8 @@ def test_mdn_asymmetric(acfactory, lp): chat = ac1.create_chat(ac2) ac2.create_chat(ac1) - # make sure mdns are enabled (usually enabled by default already) - ac1.set_config("mdns_enabled", "1") - ac2.set_config("mdns_enabled", "1") + ac1.set_config("bcc_self", "1") + ac2.set_config("bcc_self", "1") lp.sec("sending text message from ac1 to ac2") msg_out = chat.send_text("message1") diff --git a/src/imap.rs b/src/imap.rs index 892253bc2..b16360292 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -2073,6 +2073,11 @@ async fn mark_seen_by_uid( /// Schedule marking the message as Seen on IMAP by adding all known IMAP messages corresponding to /// the given Message-ID to `imap_markseen` table. pub(crate) async fn markseen_on_imap_table(context: &Context, message_id: &str) -> Result<()> { + if !context.get_config_bool(Config::BccSelf).await? + || context.get_config_bool(Config::Bot).await? + { + return Ok(()); + } context .sql .execute(