Refactoring following code to make a distinction beween followed and following users.
Also, moving sending messages to the User class.
This commit is contained in:
parent
fd9cb09de6
commit
cd805fab31
4 changed files with 63 additions and 33 deletions
|
@ -125,7 +125,6 @@ export class GameRoom {
|
|||
joinRoomMessage.getIpaddress(),
|
||||
position,
|
||||
false,
|
||||
[],
|
||||
this.positionNotifier,
|
||||
socket,
|
||||
joinRoomMessage.getTagList(),
|
||||
|
@ -228,7 +227,7 @@ export class GameRoom {
|
|||
this.leaveGroup(user);
|
||||
}
|
||||
};
|
||||
const users = user.group.getUsers().filter((u) => u.following.length === 0);
|
||||
const users = user.group.getUsers().filter((u) => !u.hasFollowers() && !u.following);
|
||||
users.forEach((foreignUser) => leaveIfOutOfRadius(foreignUser));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue