Remove unsued argument from getDeviceObject
Last usage of the `returnIdentityKey` argument was removed in 8b9a16852
.
This commit is contained in:
@@ -38161,25 +38161,14 @@ window.axolotl.sessions = {
|
||||
textsecure.storage.sessions._removeIdentityKeyForNumber(number);
|
||||
},
|
||||
|
||||
getDeviceObject: function(encodedNumber, returnIdentityKey) {
|
||||
getDeviceObject: function(encodedNumber) {
|
||||
var number = textsecure.utils.unencodeNumber(encodedNumber)[0];
|
||||
var devices = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
if (devices.length == 0) {
|
||||
if (returnIdentityKey) {
|
||||
var identityKey = textsecure.storage.devices.getIdentityKeyForNumber(number);
|
||||
if (identityKey !== undefined)
|
||||
return {identityKey: identityKey};
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
for (var i in devices)
|
||||
if (devices[i].encodedNumber == encodedNumber)
|
||||
return devices[i];
|
||||
|
||||
if (returnIdentityKey)
|
||||
return {identityKey: devices[0].identityKey};
|
||||
|
||||
return undefined;
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user