Remove unsued argument from getDeviceObject
Last usage of the `returnIdentityKey` argument was removed in 8b9a16852
.
This commit is contained in:
parent
5a46300581
commit
37e09da1cc
3 changed files with 3 additions and 36 deletions
|
@ -38162,25 +38162,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;
|
||||
},
|
||||
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
|
@ -131,25 +131,14 @@
|
|||
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;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue