Merge pull request #227 from WhisperSystems/devices

Remove unsued argument from getDeviceObject
This commit is contained in:
Matt Corallo 2015-04-21 13:14:35 -07:00
commit 4157c2c7a4
3 changed files with 3 additions and 36 deletions

View file

@ -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;
},

View file

@ -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;
},

View file

@ -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;
},