mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
add vc-contact-confirm-received message needed for multi-device-verification
This commit is contained in:
committed by
holger krekel
parent
24730e7ad6
commit
5ded8fb400
@@ -707,17 +707,21 @@ pub(crate) fn handle_securejoin_handshake(
|
|||||||
}
|
}
|
||||||
secure_connection_established(context, contact_chat_id);
|
secure_connection_established(context, contact_chat_id);
|
||||||
context.bob.write().unwrap().expects = 0;
|
context.bob.write().unwrap().expects = 0;
|
||||||
if join_vg {
|
|
||||||
// Bob -> Alice
|
// Bob -> Alice
|
||||||
send_handshake_msg(
|
send_handshake_msg(
|
||||||
context,
|
context,
|
||||||
contact_chat_id,
|
contact_chat_id,
|
||||||
"vg-member-added-received",
|
if join_vg {
|
||||||
|
"vg-member-added-received"
|
||||||
|
} else {
|
||||||
|
"vc-contact-confirm-received" // only for observe_securejoin_on_other_device()
|
||||||
|
},
|
||||||
"",
|
"",
|
||||||
None,
|
None,
|
||||||
"",
|
"",
|
||||||
);
|
);
|
||||||
}
|
|
||||||
context.bob.write().unwrap().status = 1;
|
context.bob.write().unwrap().status = 1;
|
||||||
context.stop_ongoing();
|
context.stop_ongoing();
|
||||||
Ok(if join_vg {
|
Ok(if join_vg {
|
||||||
@@ -726,7 +730,7 @@ pub(crate) fn handle_securejoin_handshake(
|
|||||||
HandshakeMessage::Ignore // "Done" deletes the message and breaks multi-device
|
HandshakeMessage::Ignore // "Done" deletes the message and breaks multi-device
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
"vg-member-added-received" => {
|
"vg-member-added-received" | "vc-contact-confirm-received" => {
|
||||||
/*==========================================================
|
/*==========================================================
|
||||||
==== Alice - the inviter side ====
|
==== Alice - the inviter side ====
|
||||||
==== Step 8 in "Out-of-band verified groups" protocol ====
|
==== Step 8 in "Out-of-band verified groups" protocol ====
|
||||||
@@ -734,9 +738,10 @@ pub(crate) fn handle_securejoin_handshake(
|
|||||||
|
|
||||||
if let Ok(contact) = Contact::get_by_id(context, contact_id) {
|
if let Ok(contact) = Contact::get_by_id(context, contact_id) {
|
||||||
if contact.is_verified(context) == VerifiedStatus::Unverified {
|
if contact.is_verified(context) == VerifiedStatus::Unverified {
|
||||||
warn!(context, "vg-member-added-received invalid.",);
|
warn!(context, "{} invalid.", step);
|
||||||
return Ok(HandshakeMessage::Ignore);
|
return Ok(HandshakeMessage::Ignore);
|
||||||
}
|
}
|
||||||
|
if join_vg {
|
||||||
inviter_progress!(context, contact_id, 800);
|
inviter_progress!(context, contact_id, 800);
|
||||||
inviter_progress!(context, contact_id, 1000);
|
inviter_progress!(context, contact_id, 1000);
|
||||||
let field_grpid = mime_message
|
let field_grpid = mime_message
|
||||||
@@ -754,9 +759,10 @@ pub(crate) fn handle_securejoin_handshake(
|
|||||||
chat_id: group_chat_id,
|
chat_id: group_chat_id,
|
||||||
contact_id,
|
contact_id,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
Ok(HandshakeMessage::Ignore) // "Done" deletes the message and breaks multi-device
|
Ok(HandshakeMessage::Ignore) // "Done" deletes the message and breaks multi-device
|
||||||
} else {
|
} else {
|
||||||
warn!(context, "vg-member-added-received invalid.",);
|
warn!(context, "{} invalid.", step);
|
||||||
Ok(HandshakeMessage::Ignore)
|
Ok(HandshakeMessage::Ignore)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user