mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
fix: protect groups even if some members are not verified
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
|
||||||
from deltachat_rpc_client import Chat, SpecialContactId
|
from deltachat_rpc_client import Chat, SpecialContactId
|
||||||
|
|
||||||
|
|
||||||
@@ -480,7 +479,6 @@ def test_gossip_verification(acfactory) -> None:
|
|||||||
assert carol_contact_alice_snapshot.is_verified
|
assert carol_contact_alice_snapshot.is_verified
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail()
|
|
||||||
def test_securejoin_after_contact_resetup(acfactory) -> None:
|
def test_securejoin_after_contact_resetup(acfactory) -> None:
|
||||||
"""
|
"""
|
||||||
Regression test for a bug that prevented joining verified group with a QR code
|
Regression test for a bug that prevented joining verified group with a QR code
|
||||||
|
|||||||
10
src/chat.rs
10
src/chat.rs
@@ -502,15 +502,7 @@ impl ChatId {
|
|||||||
|
|
||||||
match protect {
|
match protect {
|
||||||
ProtectionStatus::Protected => match chat.typ {
|
ProtectionStatus::Protected => match chat.typ {
|
||||||
Chattype::Single | Chattype::Group | Chattype::Broadcast => {
|
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::Mailinglist => bail!("Cannot protect mailing lists"),
|
Chattype::Mailinglist => bail!("Cannot protect mailing lists"),
|
||||||
},
|
},
|
||||||
ProtectionStatus::Unprotected | ProtectionStatus::ProtectionBroken => {}
|
ProtectionStatus::Unprotected | ProtectionStatus::ProtectionBroken => {}
|
||||||
|
|||||||
Reference in New Issue
Block a user