Correcting names, and deleting message

There is a known regresion for the MESSAGE_CREATE event while it's not on screen, though I have not been able to replicate it while I'm looking for it. If you see this bug, please let me know the conditions it happens under
This commit is contained in:
MathMan05 2024-06-28 11:13:26 -05:00
parent 845c7f6612
commit ac939e5fb6
17 changed files with 473 additions and 166 deletions

View file

@ -3,10 +3,11 @@ import { Channel } from "./channel.js";
import { Message } from "./message.js";
import { Localuser } from "./localuser.js";
import {User} from "./user.js";
import { Member } from "./member.js";
class Direct extends Guild{
constructor(JSON,owner:Localuser){
super(-1,owner);
super(-1,owner,null);
this.message_notifications=0;
console.log(JSON);
this.owner=owner;
@ -98,10 +99,16 @@ class Group extends Channel{
}
return div;
}
getHTML(){
async getHTML(){
if(this.guild!==this.localuser.lookingguild){
this.guild.loadGuild();
}
const prom=Message.wipeChanel();
this.guild.prevchannel=this;
this.localuser.channelfocus=this;
this.putmessages();
await this.putmessages();
await prom;
this.buildmessages();
history.pushState(null, null,"/channels/"+this.guild_id+"/"+this.id);
document.getElementById("channelname").textContent="@"+this.name;
}
@ -183,5 +190,11 @@ class Group extends Channel{
}
}
isAdmin(): boolean {
return false;
}
hasPermission(name: string, member?: Member): boolean {
return true;
}
}
export {Direct, Group};