From 01053335ac5d059376ec9ad65a556e1151d83ce7 Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 25 Feb 2016 12:35:47 -0800 Subject: [PATCH] Don't send empty read status reports // FREEBIE --- js/models/conversations.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index 5d6363f7..643b4213 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -215,11 +215,13 @@ }).map(function(m) { m.markRead(); return { - sender: m.get('source'), - timestamp: m.get('sent_at') + sender : m.get('source'), + timestamp : m.get('sent_at') }; }.bind(this)); - textsecure.messaging.sendReadReceipts(readReceipts); + if (readReceipts.length > 0) { + textsecure.messaging.sendReadReceipts(readReceipts); + } } },