diff --git a/js/glowingbear.js b/js/glowingbear.js index 26990f0..320fe44 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -929,11 +929,21 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $rootScope.createHighlight = function(buffer, message) { var title = ''; var body = ''; + var numNotifications = buffer.notification; + if (['#', '&', '+', '!'].indexOf(buffer.shortName.charAt(0)) < 0) { - title = 'Private message from '; + if (numNotifications > 1) { + title = numNotifications.toString() + ' private messages from '; + } else { + title = 'Private message from '; + } body = message.text; } else { - title = 'Highlight in '; + if (numNotifications > 1) { + title = numNotifications.toString() + ' highlights in '; + } else { + title = 'Highlight in '; + } var prefix = ''; for (var i = 0; i < message.prefix.length; i++) { prefix += message.prefix[i].text;