diff --git a/deltachat-rpc-client/tests/test_securejoin.py b/deltachat-rpc-client/tests/test_securejoin.py index 4629720908..040b267ca0 100644 --- a/deltachat-rpc-client/tests/test_securejoin.py +++ b/deltachat-rpc-client/tests/test_securejoin.py @@ -164,6 +164,21 @@ def test_qr_readreceipt(acfactory) -> None: assert not bob.get_chat_by_contact(bob_contact_charlie) +def test_setup_contact_resetup(acfactory) -> None: + """Tests that setup contact works after Alice resets the device and changes the key.""" + alice, bob = acfactory.get_online_accounts(2) + + qr_code, _svg = alice.get_qr_code() + bob.secure_join(qr_code) + bob.wait_for_securejoin_joiner_success() + + alice = acfactory.resetup_account(alice) + + qr_code, _svg = alice.get_qr_code() + bob.secure_join(qr_code) + bob.wait_for_securejoin_joiner_success() + + def test_verified_group_recovery(acfactory) -> None: """Tests verified group recovery by reverifying a member and sending a message in a group.""" ac1, ac2, ac3 = acfactory.get_online_accounts(3) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 4c4a417c33..c8eafdef61 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -338,18 +338,11 @@ impl<'a> MimeFactory<'a> { fn should_force_plaintext(&self) -> bool { match &self.loaded { Loaded::Message { chat } => { - if chat.is_protected() { - false - } else if chat.typ == Chattype::Broadcast { - // encryption may disclose recipients; - // this is probably a worse issue than not opportunistically (!) encrypting - true - } else { - self.msg - .param - .get_bool(Param::ForcePlaintext) - .unwrap_or_default() - } + self.msg + .param + .get_bool(Param::ForcePlaintext) + .unwrap_or_default() + || chat.typ == Chattype::Broadcast } Loaded::Mdn { .. } => false, }