From f8cc6bdad6d4055009fbdaa93783990c9fa50a62 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 25 Jan 2016 17:13:07 +0000 Subject: [PATCH] Don't count as an unread message if we don't have a tile for it. --- src/Unread.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Unread.js b/src/Unread.js index cf121f9bd6..2b33fec829 100644 --- a/src/Unread.js +++ b/src/Unread.js @@ -15,6 +15,7 @@ limitations under the License. */ var MatrixClientPeg = require('./MatrixClientPeg'); +var sdk = require('./index'); module.exports = { /** @@ -27,7 +28,8 @@ module.exports = { } else if (ev.getType == 'm.room.message' && ev.getContent().msgtype == 'm.notify') { return false; } - return true; + var EventTile = sdk.getComponent('rooms.EventTile'); + return EventTile.haveTileForEvent(ev); }, doesRoomHaveUnreadMessages: function(room) {