Fix textsecure.closeSession

sendIndividualProto requires a timestamp.
This commit is contained in:
lilia 2015-02-12 22:12:48 -08:00
parent 96af6b56ef
commit 0e8a5806a8
2 changed files with 2 additions and 2 deletions

View file

@ -17133,7 +17133,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);