From 33dd5259bba8b316a2c8b6d50de1daf72f3156f3 Mon Sep 17 00:00:00 2001 From: Ivo Julca Date: Tue, 17 Nov 2015 10:51:11 -0500 Subject: [PATCH] Fix highlights in focused rooms While they needn`t raise popups, they should still format the chat messages. --- js/client-chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/client-chat.js b/js/client-chat.js index 76ea23a1a..193a8b531 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -1353,7 +1353,7 @@ this.lastMessageDate = Math.max(this.lastMessageDate || 0, msgTime); } - var isHighlighted = mayNotify && userid !== app.user.get('userid') && this.getHighlight(message); + var isHighlighted = userid !== app.user.get('userid') && this.getHighlight(message); var parsedMessage = Tools.parseChatMessage(message, name, ChatRoom.getTimestamp('chat', msgTime), isHighlighted); if (!$.isArray(parsedMessage)) parsedMessage = [parsedMessage]; for (var i = 0; i < parsedMessage.length; i++) { @@ -1361,7 +1361,7 @@ this.$chat.append(parsedMessage[i]); } - if (isHighlighted) { + if (mayNotify && isHighlighted) { var $lastMessage = this.$chat.children().last(); var notifyTitle = "Mentioned by " + name + (this.id === 'lobby' ? '' : " in " + this.title); var notifyText = $lastMessage.html().indexOf('') >= 0 ? '(spoiler)' : $lastMessage.children().last().text();