diff --git a/client/js/lounge.js b/client/js/lounge.js index 41dd41a2ff..1b64c66d02 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -213,6 +213,10 @@ $(function() { target = "#chan-" + chat.find(".active").data("id"); } + // Modifying data.msg.highlight directly breaks notifications, as + // everything is passed by instance in javascript, not by value + data.msg.shouldHighlight = data.msg.highlight && data.msg.chanType !== "query"; + var chan = chat.find(target); var msg; @@ -803,7 +807,7 @@ $(function() { body = msg.from + " invited you to " + msg.channel; } else { title = msg.from; - if (!button.hasClass("query")) { + if (msg.chanType !== "query") { title += " (" + button.data("title").trim() + ")"; } title += " says:"; @@ -827,8 +831,7 @@ $(function() { } } - button = button.filter(":not(.active)"); - if (button.length === 0) { + if (button.hasClass("active")) { return; } diff --git a/client/views/msg.tpl b/client/views/msg.tpl index e605bd9570..6c716de495 100644 --- a/client/views/msg.tpl +++ b/client/views/msg.tpl @@ -1,4 +1,4 @@ -