From 44ff9e30d5df375509c8b2afff64f75f3f5dd619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 17 Dec 2021 11:54:37 +0100 Subject: [PATCH] Using id instead of name to identify other Wokas --- back/src/Model/GameRoom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/src/Model/GameRoom.ts b/back/src/Model/GameRoom.ts index 43605778..ba555c92 100644 --- a/back/src/Model/GameRoom.ts +++ b/back/src/Model/GameRoom.ts @@ -239,7 +239,7 @@ export class GameRoom { public sendToOthersInGroupIncludingUser(user: User, message: ServerToClientMessage): void { user.group?.getUsers().forEach((currentUser: User) => { - if (currentUser.name !== user.name) { + if (currentUser.id !== user.id) { currentUser.socket.write(message); } });