Fix 410 handling
We need to close the existing session with an old registrationId.
This commit is contained in:
parent
7d08e1132d
commit
a9549e2e0f
2 changed files with 6 additions and 2 deletions
|
@ -39721,7 +39721,9 @@ window.textsecure.messaging = function() {
|
|||
if (error.message == 409) {
|
||||
p = textsecure.storage.devices.removeDeviceIdsForNumber(number, error.response.extraDevices);
|
||||
} else {
|
||||
p = Promise.resolve();
|
||||
p = Promise.all(error.response.staleDevices.map(function(deviceId) {
|
||||
return textsecure.protocol_wrapper.closeOpenSessionForDevice(number + '.' + deviceId);
|
||||
}));
|
||||
}
|
||||
|
||||
p.then(function() {
|
||||
|
|
|
@ -196,7 +196,9 @@ window.textsecure.messaging = function() {
|
|||
if (error.message == 409) {
|
||||
p = textsecure.storage.devices.removeDeviceIdsForNumber(number, error.response.extraDevices);
|
||||
} else {
|
||||
p = Promise.resolve();
|
||||
p = Promise.all(error.response.staleDevices.map(function(deviceId) {
|
||||
return textsecure.protocol_wrapper.closeOpenSessionForDevice(number + '.' + deviceId);
|
||||
}));
|
||||
}
|
||||
|
||||
p.then(function() {
|
||||
|
|
Loading…
Reference in a new issue