Add protocol support for disappearing messages

This commit is contained in:
lilia 2016-09-20 14:36:57 -07:00
parent 11ed42a379
commit b3e932dce8
3 changed files with 17 additions and 10 deletions

View file

@ -38237,7 +38237,7 @@ MessageReceiver.prototype.extend({
throw e;
});
},
handleSentMessage: function(destination, timestamp, message) {
handleSentMessage: function(destination, timestamp, message, expirationStartTimestamp) {
var p = Promise.resolve();
if ((message.flags & textsecure.protobuf.DataMessage.Flags.END_SESSION) ==
textsecure.protobuf.DataMessage.Flags.END_SESSION ) {
@ -38247,9 +38247,10 @@ MessageReceiver.prototype.extend({
return this.processDecrypted(message, this.number).then(function(message) {
var ev = new Event('sent');
ev.data = {
destination : destination,
timestamp : timestamp.toNumber(),
message : message
destination : destination,
timestamp : timestamp.toNumber(),
message : message,
expirationStartTimestamp : expirationStartTimestamp
};
this.dispatchEvent(ev);
}.bind(this));
@ -38310,7 +38311,8 @@ MessageReceiver.prototype.extend({
return this.handleSentMessage(
sentMessage.destination,
sentMessage.timestamp,
sentMessage.message
sentMessage.message,
sentMessage.expirationStartTimestamp
);
} else if (syncMessage.contacts) {
this.handleContacts(syncMessage.contacts);