pub(super) async fn start_protocol(
context: &Context,
invite: QrInvite,
) -> Result<ChatId>
Expand description
Starts the securejoin protocol with the QR invite
.
This will try to start the securejoin protocol for the given QR invite
.
If Bob already has Alice’s key, he sends AUTH
token
and forgets about the invite.
If Bob does not yet have Alice’s key, he sends vc-request
or vg-request
message and stores a row in the bobstate
table
so he can check Alice’s key against the fingerprint
and send AUTH
token later.
This function takes care of handling multiple concurrent joins and handling errors while starting the protocol.
§Bob - the joiner’s side
§Step 2 in the “Setup Contact protocol”, section 2.1 of countermitm 0.10.0
§Returns
The ChatId
of the created chat is returned, for a SetupContact QR this is the 1:1
chat with Alice, for a SecureJoin QR this is the group chat.