mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
fix: do not add QR inviter to groups immediately
By the time you scan the QR code, inviter may not be in the group already. In this case securejoin protocol will never complete. If you then join the group in some other way, this results in you implicitly adding that inviter to the group.
This commit is contained in:
@@ -2841,6 +2841,16 @@ async fn apply_group_changes(
|
||||
if !is_from_in_chat {
|
||||
better_msg = Some(String::new());
|
||||
} else if let Some(key) = mime_parser.gossiped_keys.get(added_addr) {
|
||||
if !chat_contacts.contains(&from_id) {
|
||||
chat::add_to_chat_contacts_table(
|
||||
context,
|
||||
mime_parser.timestamp_sent,
|
||||
chat.id,
|
||||
&[from_id],
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
// TODO: if gossiped keys contain the same address multiple times,
|
||||
// we may lookup the wrong contact.
|
||||
// This can be fixed by looking at ChatGroupMemberAddedFpr,
|
||||
|
||||
Reference in New Issue
Block a user