Merge pull request #155 from WhisperSystems/closeSession

Fix textsecure.closeSession
This commit is contained in:
Matt Corallo 2015-02-13 10:44:06 -08:00
commit b45c09470f
2 changed files with 2 additions and 2 deletions

View file

@ -17134,7 +17134,7 @@ window.textsecure.messaging = function() {
var proto = new textsecure.protobuf.PushMessageContent();
proto.body = "TERMINATE";
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);
for (var i in devices)
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);

View file

@ -293,7 +293,7 @@ window.textsecure.messaging = function() {
var proto = new textsecure.protobuf.PushMessageContent();
proto.body = "TERMINATE";
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);
for (var i in devices)
axolotl.protocol.closeOpenSessionForDevice(devices[i].encodedNumber);