Skip to content

Commit 1ebaa2a

Browse files
committed
feat(securejoin): do not create 1:1 chat on Alice's side until vc-request-with-auth
vc-request is an unencrypted message that Bob sends when he does not have Alice's key. It also does not contain Bob's avatar and name, so the contact has only the email address at this point and it is too early to show it.
1 parent 6cb6daa commit 1ebaa2a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/securejoin.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,6 @@ pub(crate) async fn handle_securejoin_handshake(
334334

335335
inviter_progress(context, contact_id, 300);
336336

337-
// for setup-contact, make Alice's one-to-one chat with Bob visible
338-
// (secure-join-information are shown in the group chat)
339-
if !join_vg {
340-
ChatId::create_for_contact(context, contact_id).await?;
341-
}
342-
343337
// Alice -> Bob
344338
send_alice_handshake_msg(
345339
context,
@@ -435,6 +429,11 @@ pub(crate) async fn handle_securejoin_handshake(
435429
}
436430
contact_id.regossip_keys(context).await?;
437431
ContactId::scaleup_origin(context, &[contact_id], Origin::SecurejoinInvited).await?;
432+
// for setup-contact, make Alice's one-to-one chat with Bob visible
433+
// (secure-join-information are shown in the group chat)
434+
if !join_vg {
435+
ChatId::create_for_contact(context, contact_id).await?;
436+
}
438437
info!(context, "Auth verified.",);
439438
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
440439
inviter_progress(context, contact_id, 600);

src/securejoin/securejoin_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async fn test_setup_contact_ex(case: SetupContactCase) {
129129
.await
130130
.unwrap()
131131
.len(),
132-
1
132+
0
133133
);
134134

135135
let sent = alice.pop_sent_msg().await;

0 commit comments

Comments
 (0)