mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +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:
@@ -3768,14 +3768,7 @@ async fn test_leave_broadcast_multidevice() -> Result<()> {
|
||||
// The contact should be marked as verified.
|
||||
check_direct_chat_is_hidden_and_contact_is_verified(alice, bob0).await;
|
||||
check_direct_chat_is_hidden_and_contact_is_verified(bob0, alice).await;
|
||||
|
||||
// TODO: There is a known bug in `observe_securejoin_on_other_device()`:
|
||||
// When Bob joins a group or broadcast with his first device,
|
||||
// then a chat with Alice will pop up on his second device.
|
||||
// When it's fixed, the 2 following lines can be replaced with
|
||||
// `check_direct_chat_is_hidden_and_contact_is_verified(bob1, alice).await;`
|
||||
let bob1_alice_contact = bob1.add_or_lookup_contact_no_key(alice).await;
|
||||
assert!(bob1_alice_contact.is_verified(bob1).await.unwrap());
|
||||
check_direct_chat_is_hidden_and_contact_is_verified(bob1, alice).await;
|
||||
|
||||
tcm.section("Alice sends first message to broadcast.");
|
||||
let sent_msg = alice.send_text(alice_chat_id, "Hello!").await;
|
||||
|
||||
Reference in New Issue
Block a user