From c1c2297833bdeba44df379b54dda54591696c977 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Mon, 24 Feb 2014 15:31:10 +0100 Subject: [PATCH] Add nick to highlight notification from channels --- js/glowingbear.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index b2a192c..559b152 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -815,16 +815,19 @@ 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 = ''; + var body = ''; if (['#', '&', '+', '!'].indexOf(buffer.shortName.charAt(0)) < 0) { title = 'Private message from '; + body = message.text; } else { title = 'Highlight in '; + body = '<' + message.prefix[0].text + '> ' + message.text; } title += buffer.shortName; title += buffer.fullName.replace(/irc.([^\.]+)\..+/, " ($1)"); var notification = new Notification(title, { - body: message.text, + body: body, icon: 'img/favicon.png' });