Change to total number of peers, not just joined. Styling.

This commit is contained in:
Håvar Aambø Fosstveit
2020-05-05 09:56:21 +02:00
parent e2421f094f
commit 7adcef19a3
+6 -1
View File
@@ -218,7 +218,12 @@ class Room extends EventEmitter
peer.roles.some((role) => accessFromRoles.BYPASS_ROOM_LOCK.includes(role))
)
this._peerJoining(peer);
else if ('maxUsersPerRoom' in config &&(this._getJoinedPeers().length + this._lobby.peerList().length) >= config.maxUsersPerRoom)
else if (
'maxUsersPerRoom' in config &&
(
Object.keys(this._peers).length +
this._lobby.peerList().length
) >= config.maxUsersPerRoom)
{
this._handleOverRoomLimit(peer);
}