From 6039e13411a13dfb0b8a296e6b0219ceede158fa Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 10 Jun 2021 17:11:21 +0200 Subject: [PATCH] Add notification tags This makes it so multiple messages from the same user will only produce a single notification. --- components/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/app.js b/components/app.js index bb807e3..7c90e1e 100644 --- a/components/app.js +++ b/components/app.js @@ -368,6 +368,7 @@ export default class App extends Component { var notif = showNotification(title, { body: stripANSI(text), requireInteraction: true, + tag: "msg," + msg.prefix.name + "," + bufName, }); notif.addEventListener("click", () => { // TODO: scroll to message @@ -382,6 +383,7 @@ export default class App extends Component { var notif = new Notification("Invitation to " + channel, { body: msg.prefix.name + " has invited you to " + channel, requireInteraction: true, + tag: "invite," + msg.prefix.name + "," + channel, actions: [{ action: "accept", title: "Accept",