From b113cd0ad28ba3a72963fa75ca055a078b218552 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 21 Jun 2018 12:01:56 -0700 Subject: [PATCH] Expire timer updates: don't send if updated via remote message (#2473) A recent change removed the type property to make markRead() behave properly, but that broke our check 'should we send an update?' logic. So instead of using `isIncoming()` we now use the thing we previously used to determine whether a message was incoming: `receivedAt`. --- js/models/conversations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index b10635e8f..d52cd8bb8 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -925,11 +925,11 @@ wrapDeferred(message.save()), wrapDeferred(this.save({ expireTimer })), ]).then(() => { - if (message.isIncoming()) { + // if change was made remotely, don't send it to the number/group + if (receivedAt) { return message; } - // change was made locally, send it to the number/group let sendFunc; if (this.get('type') === 'private') { sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;