mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
observe_securejoin_on_other_device(): Add handling of "v*-request-with-auth" messages (#3836)
This fixes the case with multiple devices on the joining side: if we observe such a message from another device, we mark an inviter as verified and an accepted contact thus causing a subsequent "vg-member-added" message -- in case of a verified group -- to create it properly.
This commit is contained in:
@@ -561,7 +561,9 @@ pub(crate) async fn observe_securejoin_on_other_device(
|
||||
info!(context, "observing secure-join message \'{}\'", step);
|
||||
|
||||
match step.as_str() {
|
||||
"vg-member-added"
|
||||
"vg-request-with-auth"
|
||||
| "vc-request-with-auth"
|
||||
| "vg-member-added"
|
||||
| "vc-contact-confirm"
|
||||
| "vg-member-added-received"
|
||||
| "vc-contact-confirm-received" => {
|
||||
@@ -676,6 +678,12 @@ pub(crate) async fn observe_securejoin_on_other_device(
|
||||
if step.as_str() == "vg-member-added" || step.as_str() == "vc-contact-confirm" {
|
||||
inviter_progress!(context, contact_id, 1000);
|
||||
}
|
||||
if step.as_str() == "vg-request-with-auth" || step.as_str() == "vc-request-with-auth" {
|
||||
// This actually reflects what happens on the first device (which does the secure
|
||||
// join) and causes a subsequent "vg-member-added" message to create an unblocked
|
||||
// verified group.
|
||||
ChatId::create_for_contact_with_blocked(context, contact_id, Blocked::Not).await?;
|
||||
}
|
||||
Ok(if step.as_str() == "vg-member-added" {
|
||||
HandshakeMessage::Propagate
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user