diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 5d85d45b..950b244c 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -39120,7 +39120,11 @@ textsecure.MessageSender.prototype = { } }, onTimeout: function() { - this.dispatchEvent(new Event('timeout')); + if (this.contactSync || this.groupSync) { + this.dispatchEvent(new Event('success')); + } else { + this.dispatchEvent(new Event('timeout')); + } this.cleanup(); }, cleanup: function() { diff --git a/libtextsecure/sync_request.js b/libtextsecure/sync_request.js index cf84d9f3..aaa2878a 100644 --- a/libtextsecure/sync_request.js +++ b/libtextsecure/sync_request.js @@ -43,7 +43,11 @@ } }, onTimeout: function() { - this.dispatchEvent(new Event('timeout')); + if (this.contactSync || this.groupSync) { + this.dispatchEvent(new Event('success')); + } else { + this.dispatchEvent(new Event('timeout')); + } this.cleanup(); }, cleanup: function() {