Fix call to reloadDevicesAndSend - it returns a function

FREEBIE
pull/749/head
Scott Nonnenberg 8 years ago
parent f414c13220
commit 5d1150e5bc

@ -38914,9 +38914,7 @@ OutgoingMessage.prototype = {
return p.then(function() { return p.then(function() {
var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices); var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices);
return this.getKeysForNumber(number, resetDevices) return this.getKeysForNumber(number, resetDevices)
.then(function() { .then(this.reloadDevicesAndSend(number, error.code == 409));
return this.reloadDevicesAndSend(number, error.code == 409);
}.bind(this));
}.bind(this)); }.bind(this));
} else if (error.message === "Identity key changed") { } else if (error.message === "Identity key changed") {
error.timestamp = this.timestamp; error.timestamp = this.timestamp;

@ -169,9 +169,7 @@ OutgoingMessage.prototype = {
return p.then(function() { return p.then(function() {
var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices); var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices);
return this.getKeysForNumber(number, resetDevices) return this.getKeysForNumber(number, resetDevices)
.then(function() { .then(this.reloadDevicesAndSend(number, error.code == 409));
return this.reloadDevicesAndSend(number, error.code == 409);
}.bind(this));
}.bind(this)); }.bind(this));
} else if (error.message === "Identity key changed") { } else if (error.message === "Identity key changed") {
error.timestamp = this.timestamp; error.timestamp = this.timestamp;

Loading…
Cancel
Save