From aab4f105091aff1ef4c3029dbbd9d03d137a6378 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 22 Nov 2017 15:08:04 -0800 Subject: [PATCH] rotateSignedPrekeys: Fix 'res is not defined' error --- js/libtextsecure.js | 12 ++++++------ libtextsecure/account_manager.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 4e368e722d97..7810b2d479d1 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37994,12 +37994,12 @@ var TextSecureServer = (function() { keyId : res.keyId, publicKey : res.keyPair.pubKey, signature : res.signature - }); - }).then(function() { - textsecure.storage.put('signedKeyId', signedKeyId + 1); - textsecure.storage.remove('signedKeyRotationRejected'); - return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { - return cleanSignedPreKeys(); + }).then(function() { + textsecure.storage.put('signedKeyId', signedKeyId + 1); + textsecure.storage.remove('signedKeyRotationRejected'); + return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { + return cleanSignedPreKeys(); + }); }); }).catch(function(e) { console.log( diff --git a/libtextsecure/account_manager.js b/libtextsecure/account_manager.js index f0bfb60191a2..897d58407e00 100644 --- a/libtextsecure/account_manager.js +++ b/libtextsecure/account_manager.js @@ -132,12 +132,12 @@ keyId : res.keyId, publicKey : res.keyPair.pubKey, signature : res.signature - }); - }).then(function() { - textsecure.storage.put('signedKeyId', signedKeyId + 1); - textsecure.storage.remove('signedKeyRotationRejected'); - return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { - return cleanSignedPreKeys(); + }).then(function() { + textsecure.storage.put('signedKeyId', signedKeyId + 1); + textsecure.storage.remove('signedKeyRotationRejected'); + return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { + return cleanSignedPreKeys(); + }); }); }).catch(function(e) { console.log(