From 277cf125c2ec5d844081b68b02f506bbe7614c14 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Mon, 25 Nov 2024 15:32:06 -0600 Subject: [PATCH] fix bug with dms --- src/webpage/direct.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webpage/direct.ts b/src/webpage/direct.ts index f3c99a6..e6e1add 100644 --- a/src/webpage/direct.ts +++ b/src/webpage/direct.ts @@ -169,7 +169,7 @@ class Group extends Channel{ return div; } - async getHTML(){ + async getHTML(addstate=true){ const id = ++Channel.genid; if(this.localuser.channelfocus){ this.localuser.channelfocus.infinite.delete(); @@ -180,7 +180,9 @@ class Group extends Channel{ this.guild.prevchannel = this; this.localuser.channelfocus = this; const prom = this.infinite.delete(); - history.pushState([this.guild_id,this.id], "", "/channels/" + this.guild_id + "/" + this.id); + if(addstate){ + history.pushState([this.guild_id,this.id], "", "/channels/" + this.guild_id + "/" + this.id); + } this.localuser.pageTitle("@" + this.name); (document.getElementById("channelTopic") as HTMLElement).setAttribute("hidden","");