Merge pull request #118 from thelounge/astorije/target-in-notifications

Add target channel name in notifications
This commit is contained in:
Max-P 2016-02-28 01:40:38 -05:00
commit 5a108dab2d

View File

@ -672,7 +672,13 @@ $(function() {
} }
favico.badge("!"); favico.badge("!");
if (options.badge && Notification.permission === "granted") { if (options.badge && Notification.permission === "granted") {
var notify = new Notification(msg.from + " says:", { var title = msg.from;
if (!isQuery) {
title += " (" + button.text().trim() + ")";
}
title += " says:";
var notify = new Notification(title, {
body: msg.text.trim(), body: msg.text.trim(),
icon: "img/logo-64.png", icon: "img/logo-64.png",
tag: target tag: target