Preserve unverified status if aleady unverified on update

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-06-14 11:01:24 -07:00
parent 7f76bcc976
commit 666be5f358

View File

@ -61,7 +61,9 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
Log.w(TAG, "Replacing existing identity...");
VerifiedStatus verifiedStatus;
if (identityRecord.get().getVerifiedStatus() == VerifiedStatus.VERIFIED) {
if (identityRecord.get().getVerifiedStatus() == VerifiedStatus.VERIFIED ||
identityRecord.get().getVerifiedStatus() == VerifiedStatus.UNVERIFIED)
{
verifiedStatus = VerifiedStatus.UNVERIFIED;
} else {
verifiedStatus = VerifiedStatus.DEFAULT;