From 86f7df862a8b653550ae7271d2773be351c4b1ad Mon Sep 17 00:00:00 2001 From: tonymke Date: Sun, 4 May 2014 23:36:49 -0500 Subject: [PATCH] Do not highlight the user's own messages/actions. --- client/src/views/channel.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/views/channel.js b/client/src/views/channel.js index 24f9397..0b506a7 100644 --- a/client/src/views/channel.js +++ b/client/src/views/channel.js @@ -62,9 +62,13 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({ network, hour, pm; // Nick highlight detecting - if ((new RegExp('(^|\\W)(' + escapeRegex(_kiwi.app.connections.active_connection.get('nick')) + ')(\\W|$)', 'i')).test(msg.msg)) { - is_highlight = true; - msg_css_classes += ' highlight'; + var nick = _kiwi.app.connections.active_connection.get('nick'); + if ((new RegExp('(^|\\W)(' + escapeRegex(nick) + ')(\\W|$)', 'i')).test(msg.msg)) { + // Do not highlight the user's own input + if (msg.nick.localeCompare(nick) !== 0) { + is_highlight = true; + msg_css_classes += ' highlight'; + } } // Escape any HTML that may be in here -- 2.25.1