mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
fix: do not create 1:1 chat on second device when scanning a QR code
This avoids creating 1:1 chat on a second device when joining a channel. Now when joining a channel there may be no 1:1 chat with the inviter when the channel is created. In this case we still create the channel as unblocked even if 1:1 chat would be a contact request because joining the channel is an explicit action and it is not possible to add someone who did not scan a QR to the channel manually.
This commit is contained in:
@@ -839,13 +839,6 @@ pub(crate) async fn observe_securejoin_on_other_device(
|
||||
inviter_progress(context, contact_id, chat_id, chat_type)?;
|
||||
}
|
||||
|
||||
if matches!(step, SecureJoinStep::RequestWithAuth) {
|
||||
// This actually reflects what happens on the first device (which does the secure
|
||||
// join) and causes a subsequent "vg-member-added" message to create an unblocked
|
||||
// verified group.
|
||||
ChatId::create_for_contact_with_blocked(context, contact_id, Blocked::Not).await?;
|
||||
}
|
||||
|
||||
if matches!(step, SecureJoinStep::MemberAdded) {
|
||||
Ok(HandshakeMessage::Propagate)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user