mirror of
https://github.com/chatmail/core.git
synced 2026-04-23 00:16:34 +03:00
fix(json-rpc): return verifier even if the contact is not verified
This may happen if autocrypt key is changed after verification. UI should still display who introduced the contact, especially if the contact is still a member of some verified group. If the contact is at the same time not verified, i.e. its autocrypt key does not match verified key, UI may display a crossed out checkmark instead of green checkmark.
This commit is contained in:
@@ -40,17 +40,11 @@ impl ContactObject {
|
||||
};
|
||||
let is_verified = contact.is_verified(context).await? == VerifiedStatus::BidirectVerified;
|
||||
|
||||
let (verifier_addr, verifier_id) = if is_verified {
|
||||
(
|
||||
contact.get_verifier_addr(context).await?,
|
||||
contact
|
||||
.get_verifier_id(context)
|
||||
.await?
|
||||
.map(|contact_id| contact_id.to_u32()),
|
||||
)
|
||||
} else {
|
||||
(None, None)
|
||||
};
|
||||
let verifier_addr = contact.get_verifier_addr(context).await?;
|
||||
let verifier_id = contact
|
||||
.get_verifier_id(context)
|
||||
.await?
|
||||
.map(|contact_id| contact_id.to_u32());
|
||||
|
||||
Ok(ContactObject {
|
||||
address: contact.get_addr().to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user