Checking if a user should leave a group when someone moves in the group every time.

This fixes a long standing issue.
This commit is contained in:
David Négrier 2021-12-17 11:55:27 +01:00 committed by PizZaKatZe
parent 44ff9e30d5
commit fd9cb09de6

View File

@ -228,12 +228,8 @@ export class GameRoom {
this.leaveGroup(user);
}
};
if (user.following.length > 0) {
const users = user.group.getUsers().filter((u) => u.following.length === 0);
users.forEach((foreignUser) => leaveIfOutOfRadius(foreignUser));
} else {
leaveIfOutOfRadius(user);
}
const users = user.group.getUsers().filter((u) => u.following.length === 0);
users.forEach((foreignUser) => leaveIfOutOfRadius(foreignUser));
}
}