remove error in console, and search work with unlog user

This commit is contained in:
2024-01-14 17:50:34 +01:00
parent 131e599d17
commit 11392c22c4
5 changed files with 42 additions and 16 deletions

View File

@ -1,6 +1,7 @@
class Notice {
constructor(client) {
this.client = client;
this.online_users = {};
this.connect();
}
@ -25,12 +26,10 @@ class Notice {
async disconnect() {
if (this.chatSocket == undefined)
this.chatSocket.close();
return ;
this.chatSocket.close();
this.chatSocket.send(JSON.stringify({
type: "online_users",
targets: "all",
}));
}
async sendInvite(id_inviter, id_inviteds) {
@ -65,6 +64,8 @@ class Notice {
if (this.chatSocket == undefined)
return;
this.online_users = {};
this.chatSocket.send(JSON.stringify({
type: "online_users",
targets: "all",