From ad8cb870d98858f5cc0ad429d35a9c988c396c03 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 4 Aug 2017 11:09:46 -0700 Subject: [PATCH] libtextsecure.js catch-up FREEBIE --- js/libtextsecure.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 56099db27..9717f8956 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38275,9 +38275,7 @@ MessageReceiver.prototype.extend({ keepalive: { path: '/v1/keepalive', disconnect: true } }); - this.pending = Promise.resolve(); - - this.queueAllCached(); + this.pending = this.queueAllCached(); }, close: function() { this.socket.close(3000, 'called close'); @@ -38398,7 +38396,7 @@ MessageReceiver.prototype.extend({ this.dispatchEvent(ev); }, queueAllCached: function() { - this.getAllFromCache().then(function(items) { + return this.getAllFromCache().then(function(items) { for (var i = 0, max = items.length; i < max; i += 1) { this.queueCached(items[i]); }