From 7d621d88d84745d9a264dae98d5f6dcfc07eb297 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 28 Jan 2016 11:12:56 +0000 Subject: [PATCH] Your own messages should not count as unread --- src/Unread.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Unread.js b/src/Unread.js index 2b33fec829..d7490c8632 100644 --- a/src/Unread.js +++ b/src/Unread.js @@ -23,7 +23,9 @@ module.exports = { * count of unread messages */ eventTriggersUnreadCount: function(ev) { - if (ev.getType() == "m.room.member") { + if (ev.sender && ev.sender.userId == MatrixClientPeg.get().credentials.userId) { + return false; + } else if (ev.getType() == "m.room.member") { return false; } else if (ev.getType == 'm.room.message' && ev.getContent().msgtype == 'm.notify') { return false;