Preserve UNVERIFIED status on key change
Don't revert it to default, which would effectively downgrade the security model for that contact. // FREEBIE
This commit is contained in:
parent
12d9bb61c3
commit
aa6dbb2e59
1 changed files with 3 additions and 1 deletions
|
@ -431,8 +431,10 @@
|
||||||
});
|
});
|
||||||
} else if (!equalArrayBuffers(oldpublicKey, publicKey)) {
|
} else if (!equalArrayBuffers(oldpublicKey, publicKey)) {
|
||||||
console.log("Replacing existing identity...");
|
console.log("Replacing existing identity...");
|
||||||
|
var previousStatus = identityKey.get('verified');
|
||||||
var verifiedStatus;
|
var verifiedStatus;
|
||||||
if (identityKey.get('verified') === VerifiedStatus.VERIFIED) {
|
if (previousStatus === VerifiedStatus.VERIFIED
|
||||||
|
|| previousStatus === VerifiedStatus.UNVERIFIED) {
|
||||||
verifiedStatus = VerifiedStatus.UNVERIFIED;
|
verifiedStatus = VerifiedStatus.UNVERIFIED;
|
||||||
} else {
|
} else {
|
||||||
verifiedStatus = VerifiedStatus.DEFAULT;
|
verifiedStatus = VerifiedStatus.DEFAULT;
|
||||||
|
|
Loading…
Reference in a new issue