From 98596b310ff1284d8e203e3514ccc9a31bd6957d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 28 Feb 2016 06:36:58 +0000 Subject: [PATCH] Add target channel name in notification --- client/js/lounge.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index 9f2183d3..9d4ab30e 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -672,7 +672,13 @@ $(function() { } favico.badge("!"); 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(), icon: "img/logo-64.png", tag: target