diff --git a/back/src/Model/World.ts b/back/src/Model/World.ts index 06bcf884..795cc8be 100644 --- a/back/src/Model/World.ts +++ b/back/src/Model/World.ts @@ -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); }