From 1da44c847b6921bb8e405dc15d9bd7f12b15f2a8 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 3 Oct 2016 11:32:32 +0900 Subject: [PATCH] Fix handling sent messages sans expirationStartTimestamp --- js/libtextsecure.js | 6 ++++-- libtextsecure/message_receiver.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index e64ad520f..296c97f5c 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38249,9 +38249,11 @@ MessageReceiver.prototype.extend({ ev.data = { destination : destination, timestamp : timestamp.toNumber(), - message : message, - expirationStartTimestamp : expirationStartTimestamp.toNumber() + message : message }; + if (expirationStartTimestamp) { + ev.data.expirationStartTimestamp = expirationStartTimestamp.toNumber(); + } this.dispatchEvent(ev); }.bind(this)); }.bind(this)); diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 85f01e96d..884cc0acb 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -178,9 +178,11 @@ MessageReceiver.prototype.extend({ ev.data = { destination : destination, timestamp : timestamp.toNumber(), - message : message, - expirationStartTimestamp : expirationStartTimestamp.toNumber() + message : message }; + if (expirationStartTimestamp) { + ev.data.expirationStartTimestamp = expirationStartTimestamp.toNumber(); + } this.dispatchEvent(ev); }.bind(this)); }.bind(this));