Prepare to remove "vc-contact-confirm-received", "vg-member-added-received" messages from Securejoin

protocol
This commit is contained in:
iequidoo
2023-01-06 15:54:56 -03:00
committed by iequidoo
parent 8dc6ff268d
commit 5f883a4445
5 changed files with 25 additions and 5 deletions

View File

@@ -917,6 +917,17 @@ impl<'a> MimeFactory<'a> {
"Secure-Join".to_string(),
"vg-member-added".to_string(),
));
// FIXME: Old clients require Secure-Join-Fingerprint header. Remove this
// eventually.
let fingerprint = Peerstate::from_addr(context, email_to_add)
.await?
.context("No peerstate found in db")?
.public_key_fingerprint
.context("No public key fingerprint in db for the member to add")?;
headers.protected.push(Header::new(
"Secure-Join-Fingerprint".into(),
fingerprint.hex(),
));
}
}
SystemMessage::GroupNameChanged => {