De-duplicate registrationId in deviceObject
This commit is contained in:
parent
92d0de6837
commit
b356403061
3 changed files with 11 additions and 7 deletions
|
@ -40,6 +40,7 @@
|
|||
delete deviceObject['signedKeySignature'];
|
||||
delete deviceObject['preKey'];
|
||||
delete deviceObject['preKeyId'];
|
||||
delete deviceObject['registrationId'];
|
||||
} catch(_) {}
|
||||
return internalSaveDeviceObject(deviceObject, false);
|
||||
},
|
||||
|
@ -127,7 +128,7 @@
|
|||
};
|
||||
|
||||
var internalSaveDeviceObject = function(deviceObject, onlyKeys) {
|
||||
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined || deviceObject.registrationId === undefined)
|
||||
if (deviceObject.identityKey === undefined || deviceObject.encodedNumber === undefined)
|
||||
throw new Error("Tried to store invalid deviceObject");
|
||||
|
||||
var number = textsecure.utils.unencodeNumber(deviceObject.encodedNumber)[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue