Handle sync request where no groups are sent

If a user has no groups, no group sync message is sent. This is a normal
result that should result in a success event rather than a timeout.

// FREEBIE
This commit is contained in:
lilia 2016-06-24 17:21:44 -07:00
parent 8203e71ac3
commit 80c6a2802f
2 changed files with 10 additions and 2 deletions

View file

@ -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() {

View file

@ -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() {