Remove hasOpenSession from protocol_wrapper
// FREEBIE
This commit is contained in:
parent
0483fa2f97
commit
7939b6ae98
3 changed files with 6 additions and 14 deletions
|
@ -35501,11 +35501,6 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ
|
||||||
},
|
},
|
||||||
createIdentityKeyRecvSocket: function() {
|
createIdentityKeyRecvSocket: function() {
|
||||||
return protocolInstance.createIdentityKeyRecvSocket();
|
return protocolInstance.createIdentityKeyRecvSocket();
|
||||||
},
|
|
||||||
hasOpenSession: function(encodedNumber) {
|
|
||||||
return queueJobForNumber(encodedNumber, function() {
|
|
||||||
return protocolInstance.hasOpenSession(encodedNumber);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
@ -35751,8 +35746,9 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ
|
||||||
}
|
}
|
||||||
var updateDevices = [];
|
var updateDevices = [];
|
||||||
return Promise.all(deviceIds.map(function(deviceId) {
|
return Promise.all(deviceIds.map(function(deviceId) {
|
||||||
var address = new libsignal.SignalProtocolAddress(number, deviceId).toString();
|
var address = new libsignal.SignalProtocolAddress(number, deviceId);
|
||||||
return textsecure.protocol_wrapper.hasOpenSession(address).then(function(hasSession) {
|
var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address);
|
||||||
|
return sessionCipher.hasOpenSession().then(function(hasSession) {
|
||||||
if (!hasSession) {
|
if (!hasSession) {
|
||||||
updateDevices.push(deviceId);
|
updateDevices.push(deviceId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,11 +36,6 @@
|
||||||
},
|
},
|
||||||
createIdentityKeyRecvSocket: function() {
|
createIdentityKeyRecvSocket: function() {
|
||||||
return protocolInstance.createIdentityKeyRecvSocket();
|
return protocolInstance.createIdentityKeyRecvSocket();
|
||||||
},
|
|
||||||
hasOpenSession: function(encodedNumber) {
|
|
||||||
return queueJobForNumber(encodedNumber, function() {
|
|
||||||
return protocolInstance.hasOpenSession(encodedNumber);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
}
|
}
|
||||||
var updateDevices = [];
|
var updateDevices = [];
|
||||||
return Promise.all(deviceIds.map(function(deviceId) {
|
return Promise.all(deviceIds.map(function(deviceId) {
|
||||||
var address = new libsignal.SignalProtocolAddress(number, deviceId).toString();
|
var address = new libsignal.SignalProtocolAddress(number, deviceId);
|
||||||
return textsecure.protocol_wrapper.hasOpenSession(address).then(function(hasSession) {
|
var sessionCipher = new libsignal.SessionCipher(textsecure.storage.protocol, address);
|
||||||
|
return sessionCipher.hasOpenSession().then(function(hasSession) {
|
||||||
if (!hasSession) {
|
if (!hasSession) {
|
||||||
updateDevices.push(deviceId);
|
updateDevices.push(deviceId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue