Skip to content

Commit

Permalink
feat: Don't require backwards verification to add a contact to verifi…
Browse files Browse the repository at this point in the history
…ed group

All UIs should check this anyway and explain to the user why an only forward-verified contact mayn't
be added to verified groups (to protect from situations when the contact doesn't trust our key and
rejects the addition). In Core it looks superfluous (in fact we just don't know what happens, maybe
the contact has gone offline, but otherwise everything is fine), so let's only check forward
verification, anyway the check is raceful and at the point of the function return the verification
might break.
  • Loading branch information
iequidoo committed Oct 29, 2024
1 parent 6a17a5e commit 00b148e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3743,10 +3743,10 @@ pub(crate) async fn add_contact_to_chat_ex(
}
} else {
// else continue and send status mail
if chat.is_protected() && !contact.is_verified(context).await? {
if chat.is_protected() && !contact.is_forward_verified(context).await? {
error!(
context,
"Cannot add non-bidirectionally verified contact {contact_id} to protected chat {chat_id}."
"Cannot add non-forward verified contact {contact_id} to protected chat {chat_id}."
);
return Ok(false);
}
Expand Down

0 comments on commit 00b148e

Please sign in to comment.