Small verification fixes (#4317)

* Small performance improvement by not unnecessarily loading the peerstate

* Remove wrong info message "{contact} verified" when scanning a QR code with just an email

I think that this was a bug in the original C code and then slipped
through two refactorings.
This commit is contained in:
Hocuri
2023-04-13 18:14:23 +02:00
committed by GitHub
parent 619b849ce7
commit 28fd27476f
3 changed files with 5 additions and 13 deletions

View File

@@ -1195,9 +1195,7 @@ impl Contact {
if peerstate.verified_key.is_some() {
return Ok(VerifiedStatus::BidirectVerified);
}
}
if let Some(peerstate) = Peerstate::from_addr(context, &self.addr).await? {
} else if let Some(peerstate) = Peerstate::from_addr(context, &self.addr).await? {
if peerstate.verified_key.is_some() {
return Ok(VerifiedStatus::BidirectVerified);
}