-
Notifications
You must be signed in to change notification settings - Fork 96
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: mark 1:1 chat as verified for Bob early #5116
feat: mark 1:1 chat as verified for Bob early #5116
Conversation
Surprisingly all the tests pass. But this actually needs a new test that checks we can get two-way verification without exchanging any securejoin messages. |
src/securejoin/bob.rs
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notify_peer_verified()
doesn't look like a good function name. It not only notifies the user, but also sets the chat protection. Maybe just set_peer_verified()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed it and going to merge this PR into #5089 now.
9289de6
to
c2df003
Compare
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.
e0ee897
to
8361541
Compare
Based on PR #5089
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.