Preserve UNVERIFIED status on key change

Don't revert it to default, which would effectively downgrade the security model
for that contact.

// FREEBIE
pull/749/head
lilia 8 years ago committed by Scott Nonnenberg
parent 12d9bb61c3
commit aa6dbb2e59

@ -431,8 +431,10 @@
});
} else if (!equalArrayBuffers(oldpublicKey, publicKey)) {
console.log("Replacing existing identity...");
var previousStatus = identityKey.get('verified');
var verifiedStatus;
if (identityKey.get('verified') === VerifiedStatus.VERIFIED) {
if (previousStatus === VerifiedStatus.VERIFIED
|| previousStatus === VerifiedStatus.UNVERIFIED) {
verifiedStatus = VerifiedStatus.UNVERIFIED;
} else {
verifiedStatus = VerifiedStatus.DEFAULT;

Loading…
Cancel
Save