Fix no delivery receipts on close session messages
// FREEBIE
This commit is contained in:
parent
adf919e0fe
commit
bc576e18d5
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue