diff --git a/src/webpage/direct.ts b/src/webpage/direct.ts index b4c0807..596b868 100644 --- a/src/webpage/direct.ts +++ b/src/webpage/direct.ts @@ -188,6 +188,7 @@ class Group extends Channel{ this.rendertyping(); await this.putmessages(); await prom; + this.localuser.getSidePannel(); if(id !== Channel.genid){ return; } diff --git a/src/webpage/index.html b/src/webpage/index.html index e13007e..e7b6b89 100644 --- a/src/webpage/index.html +++ b/src/webpage/index.html @@ -78,8 +78,7 @@ -
-
+
diff --git a/src/webpage/localuser.ts b/src/webpage/localuser.ts index f639d36..c58c814 100644 --- a/src/webpage/localuser.ts +++ b/src/webpage/localuser.ts @@ -526,9 +526,10 @@ class Localuser{ } return channel; // Add this line to return the 'channel' variable } - async memberListUpdate(list:memberlistupdatejson){ + async memberListUpdate(list:memberlistupdatejson|void){ const div=document.getElementById("sideDiv") as HTMLDivElement; div.innerHTML=""; + if(!list) return; const counts=new Map(); const guild=this.lookingguild; if(!guild) return; @@ -616,7 +617,13 @@ class Localuser{ console.log(elms); } async getSidePannel(){ + if(this.ws&&this.channelfocus){ + console.log(this.channelfocus.guild.id); + if(this.channelfocus.guild.id==="@me"){ + this.memberListUpdate(); + return; + } this.ws.send(JSON.stringify({ d:{ channels:{[this.channelfocus.id]:[[0,99]]},