Merge pull request #633 from sachaaaaa/ensure_primaryDevicePubKey_set

Ensure primaryDevicePubKey is always defined in storage
pull/636/head
sachaaaaa 5 years ago committed by GitHub
commit 78f97bf116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -305,6 +305,12 @@
storage.put('PoWDifficulty', window.getDefaultPoWDifficulty());
}
// Ensure accounts created prior to 1.0.0-beta8 do have their
// 'primaryDevicePubKey' defined.
if (Whisper.Registration.isDone() && !storage.get('primaryDevicePubKey', null)) {
storage.put('primaryDevicePubKey', textsecure.storage.user.getNumber());
}
// These make key operations available to IPC handlers created in preload.js
window.Events = {
getDeviceName: () => textsecure.storage.user.getDeviceName(),

Loading…
Cancel
Save