remove error in console, and search work with unlog user
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user