Allow one more retry if we get a 409

Handle cases where we get a 409 (missing/extra devices), handle it, then
get a 410 (stale devices by registration id).

// FREEBIE
This commit is contained in:
lilia 2015-09-28 14:10:50 -07:00
parent 8453424ebd
commit 1879e73c76
2 changed files with 2 additions and 2 deletions

View file

@ -39831,7 +39831,7 @@ window.textsecure.messaging = function() {
p.then(function() {
var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices);
getKeysForNumber(number, resetDevices)
.then(reloadDevicesAndSend(number, false))
.then(reloadDevicesAndSend(number, (error.code == 409)))
.catch(function(error) {
registerError(number, "Failed to reload device keys", error);
});

View file

@ -152,7 +152,7 @@ window.textsecure.messaging = function() {
p.then(function() {
var resetDevices = ((error.code == 410) ? error.response.staleDevices : error.response.missingDevices);
getKeysForNumber(number, resetDevices)
.then(reloadDevicesAndSend(number, false))
.then(reloadDevicesAndSend(number, (error.code == 409)))
.catch(function(error) {
registerError(number, "Failed to reload device keys", error);
});