Notifications: Improve channel detection

This commit is contained in:
Lorenz Hübschle-Schneider 2014-02-21 09:49:03 +00:00
parent 157917d40c
commit effa64084b

View file

@ -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)");