Add missing validity check to device storage
This commit is contained in:
parent
30dd13e8e3
commit
bfb3e7751e
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@
|
|||
};
|
||||
|
||||
var internalSaveDeviceObject = function(deviceObject, onlyKeys) {
|
||||
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined)
|
||||
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined || deviceObject.registrationId === undefined)
|
||||
throw new Error("Tried to store invalid deviceObject");
|
||||
|
||||
var number = textsecure.utils.unencodeNumber(deviceObject.encodedNumber)[0];
|
||||
|
|
Loading…
Reference in a new issue