diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 23ce8599d..f8d2b909b 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -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, diff --git a/src/securejoin/bob.rs b/src/securejoin/bob.rs index fbe4446b6..123dc212c 100644 --- a/src/securejoin/bob.rs +++ b/src/securejoin/bob.rs @@ -126,17 +126,6 @@ pub(super) async fn start_protocol(context: &Context, invite: QrInvite) -> Resul match invite { QrInvite::Group { .. } => { let joining_chat_id = joining_chat_id(context, &invite, private_chat_id).await?; - // We created the group already, now we need to add Alice to the group. - // The group will only become usable once the protocol is finished. - if !is_contact_in_chat(context, joining_chat_id, invite.contact_id()).await? { - chat::add_to_chat_contacts_table( - context, - time(), - joining_chat_id, - &[invite.contact_id()], - ) - .await?; - } let msg = stock_str::secure_join_started(context, invite.contact_id()).await; chat::add_info_msg(context, joining_chat_id, &msg, time()).await?; Ok(joining_chat_id)