From 37e09da1cc155d2d58abc370cde2eae02ab376ab Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 20 Apr 2015 14:17:04 -0700 Subject: [PATCH] Remove unsued argument from getDeviceObject Last usage of the `returnIdentityKey` argument was removed in 8b9a16852. --- js/key_worker.js | 13 +------------ js/libtextsecure.js | 13 +------------ libtextsecure/storage/devices.js | 13 +------------ 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/js/key_worker.js b/js/key_worker.js index c9d39f44c..4d5e2a0d7 100644 --- a/js/key_worker.js +++ b/js/key_worker.js @@ -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; }, diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 674478588..80719bcdc 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -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; }, diff --git a/libtextsecure/storage/devices.js b/libtextsecure/storage/devices.js index 3c5a6bee4..2f56fa0e9 100644 --- a/libtextsecure/storage/devices.js +++ b/libtextsecure/storage/devices.js @@ -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; },