From effa64084bab73ca9256b590fbe46b8bdf9259c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Fri, 21 Feb 2014 09:49:03 +0000 Subject: [PATCH] Notifications: Improve channel detection --- js/glowingbear.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 787b928..2db16c7 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -755,10 +755,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', /* Function gets called from bufferLineAdded code if user should be notified */ $rootScope.createHighlight = function(buffer, message) { var title = ''; - if (buffer.shortName.charAt(0) === '#') { - title = 'Highlight in '; - } else { + if (['#', '&', '+', '!'].indexOf(buffer.shortName.charAt(0)) < 0) { title = 'Private message from '; + } else { + title = 'Highlight in '; } title += buffer.shortName; title += buffer.fullName.replace(/irc.([^\.]+)\..+/, " ($1)");