fix: protect groups even if some members are not verified

This commit is contained in:
link2xt
2023-12-06 03:43:53 +00:00
parent 05e783564f
commit b00703cec2
2 changed files with 1 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
import logging
import pytest
from deltachat_rpc_client import Chat, SpecialContactId
@@ -480,7 +479,6 @@ def test_gossip_verification(acfactory) -> None:
assert carol_contact_alice_snapshot.is_verified
@pytest.mark.xfail()
def test_securejoin_after_contact_resetup(acfactory) -> None:
"""
Regression test for a bug that prevented joining verified group with a QR code

View File

@@ -502,15 +502,7 @@ impl ChatId {
match protect {
ProtectionStatus::Protected => match chat.typ {
Chattype::Single | Chattype::Group | Chattype::Broadcast => {
let contact_ids = get_chat_contacts(context, self).await?;
for contact_id in contact_ids {
let contact = Contact::get_by_id(context, contact_id).await?;
if !contact.is_verified(context).await? {
bail!("{} is not verified.", contact.get_display_name());
}
}
}
Chattype::Single | Chattype::Group | Chattype::Broadcast => {}
Chattype::Mailinglist => bail!("Cannot protect mailing lists"),
},
ProtectionStatus::Unprotected | ProtectionStatus::ProtectionBroken => {}