Fix no delivery receipts on close session messages

// FREEBIE
This commit is contained in:
lilia 2015-12-11 12:05:50 -08:00
parent adf919e0fe
commit bc576e18d5
3 changed files with 5 additions and 5 deletions

View file

@ -37494,11 +37494,11 @@ MessageSender.prototype = {
}.bind(this));
},
closeSession: function(number) {
closeSession: function(number, timestamp) {
var proto = new textsecure.protobuf.DataMessage();
proto.body = "TERMINATE";
proto.flags = textsecure.protobuf.DataMessage.Flags.END_SESSION;
return this.sendIndividualProto(number, proto, Date.now()).then(function(res) {
return this.sendIndividualProto(number, proto, timestamp).then(function(res) {
return textsecure.storage.devices.getDeviceObjectsForNumber(number).then(function(devices) {
return Promise.all(devices.map(function(device) {
return textsecure.protocol_wrapper.closeOpenSessionForDevice(device.encodedNumber);

View file

@ -133,7 +133,7 @@
received_at : now,
flags : textsecure.protobuf.DataMessage.Flags.END_SESSION
});
message.send(textsecure.messaging.closeSession(this.id));
message.send(textsecure.messaging.closeSession(this.id, now));
}
},

View file

@ -152,11 +152,11 @@ MessageSender.prototype = {
}.bind(this));
},
closeSession: function(number) {
closeSession: function(number, timestamp) {
var proto = new textsecure.protobuf.DataMessage();
proto.body = "TERMINATE";
proto.flags = textsecure.protobuf.DataMessage.Flags.END_SESSION;
return this.sendIndividualProto(number, proto, Date.now()).then(function(res) {
return this.sendIndividualProto(number, proto, timestamp).then(function(res) {
return textsecure.storage.devices.getDeviceObjectsForNumber(number).then(function(devices) {
return Promise.all(devices.map(function(device) {
return textsecure.protocol_wrapper.closeOpenSessionForDevice(device.encodedNumber);