Using id instead of name to identify other Wokas
This commit is contained in:
parent
ab994183e5
commit
44ff9e30d5
@ -239,7 +239,7 @@ export class GameRoom {
|
|||||||
|
|
||||||
public sendToOthersInGroupIncludingUser(user: User, message: ServerToClientMessage): void {
|
public sendToOthersInGroupIncludingUser(user: User, message: ServerToClientMessage): void {
|
||||||
user.group?.getUsers().forEach((currentUser: User) => {
|
user.group?.getUsers().forEach((currentUser: User) => {
|
||||||
if (currentUser.name !== user.name) {
|
if (currentUser.id !== user.id) {
|
||||||
currentUser.socket.write(message);
|
currentUser.socket.write(message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user