Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(securejoin): do not create 1:1 chat on Alice's side until vc-request-with-auth #6696

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/securejoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,6 @@ pub(crate) async fn handle_securejoin_handshake(

inviter_progress(context, contact_id, 300);

// for setup-contact, make Alice's one-to-one chat with Bob visible
// (secure-join-information are shown in the group chat)
if !join_vg {
ChatId::create_for_contact(context, contact_id).await?;
}

// Alice -> Bob
send_alice_handshake_msg(
context,
Expand Down Expand Up @@ -435,6 +429,11 @@ pub(crate) async fn handle_securejoin_handshake(
}
contact_id.regossip_keys(context).await?;
ContactId::scaleup_origin(context, &[contact_id], Origin::SecurejoinInvited).await?;
// for setup-contact, make Alice's one-to-one chat with Bob visible
// (secure-join-information are shown in the group chat)
if !join_vg {
ChatId::create_for_contact(context, contact_id).await?;
}
info!(context, "Auth verified.",);
context.emit_event(EventType::ContactsChanged(Some(contact_id)));
inviter_progress(context, contact_id, 600);
Expand Down
2 changes: 1 addition & 1 deletion src/securejoin/securejoin_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async fn test_setup_contact_ex(case: SetupContactCase) {
.await
.unwrap()
.len(),
1
0
);

let sent = alice.pop_sent_msg().await;
Expand Down
Loading