From e5c98ba2d19c0220ec3c6a0163c39625f6bbf575 Mon Sep 17 00:00:00 2001 From: or-else Date: Tue, 9 Jan 2018 15:13:57 -0800 Subject: [PATCH] bug fix for an "read" status not being sent in case of deleted messages --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8cca8dd3..2e997908 100644 --- a/index.html +++ b/index.html @@ -2779,7 +2779,6 @@ // console.log("topic subscriptions updated"); }, handleNewMessage: function(msg) { - clearTimeout(this.readTimer); // Regenerate messages list var topic = Tinode.getTopic(this.state.topic); var newState = {messages: []}; @@ -2791,6 +2790,8 @@ // msg could be null if one or more messages were deleted. if (msg && !msg.deleted) { + clearTimeout(this.readTimer); + // If the message is added to the end of the message list, // scroll to the bottom. if (topic.isNewMessage(msg.seq)) {