Only set when account already created

pull/633/head
sachaaaaa 6 years ago
parent 0b41ef0983
commit 8850d9bcce

@ -307,8 +307,7 @@
// Ensure accounts created prior to 1.0.0-beta8 do have their
// 'primaryDevicePubKey' defined.
const primaryDevicePubKey = storage.get('primaryDevicePubKey', null);
if (!primaryDevicePubKey) {
if (Whisper.Registration.isDone() && !storage.get('primaryDevicePubKey', null)) {
storage.put('primaryDevicePubKey', textsecure.storage.user.getNumber());
}

Loading…
Cancel
Save