feat(backwards-compat): For now, send Chat-Verified header (instead of _verified) again

This commit is contained in:
Hocuri
2025-10-29 15:52:54 +01:00
committed by GitHub
parent 2ada3cd613
commit 8b4c718b6b
9 changed files with 87 additions and 13 deletions

View File

@@ -3554,10 +3554,16 @@ async fn mark_recipients_as_verified(
mimeparser: &MimeMessage,
) -> Result<()> {
let verifier_id = Some(from_id).filter(|&id| id != ContactId::SELF);
// We don't yet send the _verified property in autocrypt headers.
// Until we do, we instead accept the Chat-Verified header as indication all contacts are verified.
// TODO: Ignore ChatVerified header once we reset existing verifications.
let chat_verified = mimeparser.get_header(HeaderDef::ChatVerified).is_some();
for gossiped_key in mimeparser
.gossiped_keys
.values()
.filter(|gossiped_key| gossiped_key.verified)
.filter(|gossiped_key| gossiped_key.verified || chat_verified)
{
let fingerprint = gossiped_key.public_key.dc_fingerprint().hex();
let Some(to_id) = lookup_key_contact_by_fingerprint(context, &fingerprint).await? else {