Merge pull request #155 from WhisperSystems/closeSession
Fix textsecure.closeSession
This commit is contained in:
commit
b45c09470f
2 changed files with 2 additions and 2 deletions
|
@ -17134,7 +17134,7 @@ window.textsecure.messaging = function() {
|
||||||
var proto = new textsecure.protobuf.PushMessageContent();
|
var proto = new textsecure.protobuf.PushMessageContent();
|
||||||
proto.body = "TERMINATE";
|
proto.body = "TERMINATE";
|
||||||
proto.flags = textsecure.protobuf.PushMessageContent.Flags.END_SESSION;
|
proto.flags = textsecure.protobuf.PushMessageContent.Flags.END_SESSION;
|
||||||
return sendIndividualProto(number, proto).then(function(res) {
|
return sendIndividualProto(number, proto, Date.now()).then(function(res) {
|
||||||
var devices = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
var devices = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||||
for (var i in devices)
|
for (var i in devices)
|
||||||
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);
|
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);
|
||||||
|
|
|
@ -293,7 +293,7 @@ window.textsecure.messaging = function() {
|
||||||
var proto = new textsecure.protobuf.PushMessageContent();
|
var proto = new textsecure.protobuf.PushMessageContent();
|
||||||
proto.body = "TERMINATE";
|
proto.body = "TERMINATE";
|
||||||
proto.flags = textsecure.protobuf.PushMessageContent.Flags.END_SESSION;
|
proto.flags = textsecure.protobuf.PushMessageContent.Flags.END_SESSION;
|
||||||
return sendIndividualProto(number, proto).then(function(res) {
|
return sendIndividualProto(number, proto, Date.now()).then(function(res) {
|
||||||
var devices = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
var devices = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||||
for (var i in devices)
|
for (var i in devices)
|
||||||
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);
|
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);
|
||||||
|
|
Loading…
Reference in a new issue