From d7f241ddee0f51fc81553a29e66a2d1bbfd3721a Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 3 Jan 2017 14:14:55 +0100 Subject: [PATCH] Use correct type on timer updates --- 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 89b2f9f6..16b0f74b 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -200,7 +200,7 @@ this.save({ expireTimer: expireTimer }); var message = this.messageCollection.add({ conversationId : this.id, - type : 'outgoing', + type : received_at ? 'incoming' : 'outgoing', sent_at : timestamp, received_at : timestamp, flags : textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE, @@ -213,7 +213,7 @@ message.set({destination: this.id}); } message.save(); - if (!received_at) { // outgoing update, send it to the number/group + if (message.isOutgoing()) { // outgoing update, send it to the number/group var sendFunc; if (this.get('type') == 'private') { sendFunc = textsecure.messaging.sendExpirationTimerUpdateToNumber;