Don't promote archived sessions, more logging on error
This commit is contained in:
parent
1098e59f87
commit
5369950c1d
7 changed files with 161 additions and 48 deletions
|
@ -589,14 +589,19 @@ export default class OutgoingMessage {
|
|||
identifier: string,
|
||||
deviceIdsToRemove: Array<number>
|
||||
): Promise<void> {
|
||||
let promise = Promise.resolve();
|
||||
for (const j in deviceIdsToRemove) {
|
||||
promise = promise.then(async () => {
|
||||
const encodedAddress = `${identifier}.${deviceIdsToRemove[j]}`;
|
||||
return window.textsecure.storage.protocol.removeSession(encodedAddress);
|
||||
});
|
||||
}
|
||||
return promise;
|
||||
await Promise.all(
|
||||
deviceIdsToRemove.map(async deviceId => {
|
||||
const address = new window.libsignal.SignalProtocolAddress(
|
||||
identifier,
|
||||
deviceId
|
||||
);
|
||||
const sessionCipher = new window.libsignal.SessionCipher(
|
||||
window.textsecure.storage.protocol,
|
||||
address
|
||||
);
|
||||
await sessionCipher.closeOpenSessionForDevice();
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
async sendToIdentifier(providedIdentifier: string): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue