fix: create group chats unprotected on verification error

This commit is contained in:
link2xt
2025-05-31 11:04:12 +00:00
committed by l
parent 32263b4574
commit becb83faf1
3 changed files with 24 additions and 13 deletions

View File

@@ -2138,11 +2138,14 @@ async fn create_group(
let create_protected = if mime_parser.get_header(HeaderDef::ChatVerified).is_some() {
if let VerifiedEncryption::NotVerified(err) = verified_encryption {
warn!(context, "Verification problem: {err:#}.");
let s = format!("{err}. See 'Info' for more details");
mime_parser.replace_msg_by_error(&s);
warn!(
context,
"Creating unprotected group because of the verification problem: {err:#}."
);
ProtectionStatus::Unprotected
} else {
ProtectionStatus::Protected
}
ProtectionStatus::Protected
} else {
ProtectionStatus::Unprotected
};