From cc34929bdbe392d2e3d7654e142e64d99279c751 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Fri, 21 Jun 2024 17:54:55 -0500 Subject: [PATCH] Support for clicking on notification --- webpage/channel.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webpage/channel.js b/webpage/channel.js index 4994729..a94f377 100644 --- a/webpage/channel.js +++ b/webpage/channel.js @@ -340,6 +340,9 @@ class channel{ }) } getHTML(){ + if(this.owner!==this.owner.owner.lookingguild){ + this.owner.loadGuild(); + } this.owner.prevchannel=this; this.owner.owner.channelfocus=this.id; this.putmessages(); @@ -532,6 +535,10 @@ class channel{ icon:message.author.getpfpsrc(), image:imgurl, }); + notification.addEventListener("click",_=>{ + window.focus(); + this.getHTML(); + }) } else if (Notification.permission !== "denied") { Notification.requestPermission().then((permission) => { this.notify(message);