Archive sessions on key changes after profile fetch
// FREEBIE
This commit is contained in:
parent
4232f5711c
commit
3acfda3a56
2 changed files with 16 additions and 2 deletions
|
@ -338,6 +338,16 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
archiveAllSessions: function(number) {
|
||||
return this.getDeviceIds(number).then(function(deviceIds) {
|
||||
return Promise.all(deviceIds.map(function(deviceId) {
|
||||
var address = new libsignal.SignalProtocolAddress(number, deviceId);
|
||||
console.log('closing session for', address.toString());
|
||||
var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address);
|
||||
return sessionCipher.closeOpenSessionForDevice();
|
||||
}));
|
||||
});
|
||||
},
|
||||
clearSessionStore: function() {
|
||||
return new Promise(function(resolve) {
|
||||
var sessions = new SessionCollection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue