Notification support

Be warned, there's either a bug in the server or notification level setting isn't implemented on the server side
This commit is contained in:
MathMan05 2024-06-21 16:47:45 -05:00
parent 0d5e4fc94b
commit 31f3fef52d
5 changed files with 141 additions and 0 deletions

View file

@ -126,6 +126,20 @@ class group extends channel{
}
}
this.unreads();
if(messagez.author===this.owner.owner.user){
return;
}
if(this.owner.owner.lookingguild.prevchannel===this&&document.hasFocus()){
return;
}
if(this.notification==="all"){
this.notify(messagez);
}else if(this.notification==="mentions"&&messagez.mentionsuser(this.owner.owner.user)){
this.notify(messagez);
}
}
notititle(message){
return message.author.username;
}
unreads(){
const sentdms=document.getElementById("sentdms");