Adding support for leaving the group if the socket is closed
This commit is contained in:
parent
bf0fa516d4
commit
c778afcbca
@ -34,7 +34,10 @@ export class World {
|
||||
}
|
||||
|
||||
public leave(user : ExSocketInterface){
|
||||
/*TODO leaver user in group*/
|
||||
let userObj = this.users.get(user.id);
|
||||
if (userObj !== undefined && typeof userObj.group !== 'undefined') {
|
||||
this.leaveGroup(user);
|
||||
}
|
||||
this.users.delete(user.userId);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user