diff --git a/client/js/lounge.js b/client/js/lounge.js index 7ffae757..9f2183d3 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -665,10 +665,7 @@ $(function() { chat.on("msg", ".messages", function(e, target, msg) { var button = sidebar.find(".chan[data-target='" + target + "']"); var isQuery = button.hasClass("query"); - var type = msg.type; - var highlight = type.contains("highlight"); - var message = type.contains("message"); - if (highlight || isQuery || (options.notifyAllMessages && message)) { + if (msg.highlight || isQuery || (options.notifyAllMessages && msg.type === "message")) { if (!document.hasFocus() || !$(target).hasClass("active")) { if (options.notification) { pop.play(); @@ -704,7 +701,7 @@ $(function() { "nick", "mode", ]; - if ($.inArray(type, ignore) !== -1){ + if ($.inArray(msg.type, ignore) !== -1){ return; } @@ -713,7 +710,7 @@ $(function() { var i = (badge.data("count") || 0) + 1; badge.data("count", i); badge.html(i > 999 ? (i / 1000).toFixed(1) + "k" : i); - if (highlight || isQuery) { + if (msg.highlight || isQuery) { badge.addClass("highlight"); } } diff --git a/client/views/msg.tpl b/client/views/msg.tpl index 755f911e..35ca031f 100644 --- a/client/views/msg.tpl +++ b/client/views/msg.tpl @@ -1,4 +1,4 @@ -