Remove hasOpenSession from protocol_wrapper

// FREEBIE
This commit is contained in:
lilia 2016-05-01 15:29:37 -07:00
parent 0483fa2f97
commit 7939b6ae98
3 changed files with 6 additions and 14 deletions

View file

@ -19,8 +19,9 @@
}
var updateDevices = [];
return Promise.all(deviceIds.map(function(deviceId) {
var address = new libsignal.SignalProtocolAddress(number, deviceId).toString();
return textsecure.protocol_wrapper.hasOpenSession(address).then(function(hasSession) {
var address = new libsignal.SignalProtocolAddress(number, deviceId);
var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address);
return sessionCipher.hasOpenSession().then(function(hasSession) {
if (!hasSession) {
updateDevices.push(deviceId);
}