feat: mark 1:1 chat as verified for Bob early

Mark 1:1 chat as verified as soon as Alice is forward-verified
so Bob can already start sending Chat-Verified headers.
This way Alice and Bob can scan each other's QR codes
and even if all Secure-Join headers are dropped from the network,
still get forward verifications via QR-code scans
and backward verifications via Chat-Verified messages in 1:1 chat.
This commit is contained in:
link2xt
2023-12-19 23:43:11 +00:00
parent 9415a71f9d
commit c708c44f0a
3 changed files with 30 additions and 22 deletions

View File

@@ -100,6 +100,9 @@ pub(super) async fn handle_auth_required(
let chat_id = bobstate.joining_chat_id(context).await?;
chat::add_info_msg(context, chat_id, &msg, time()).await?;
}
bobstate
.notify_peer_verified(context, message.timestamp_sent)
.await?;
bobstate.emit_progress(context, JoinerProgress::RequestWithAuthSent);
Ok(HandshakeMessage::Done)
}