mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 17:40:46 -04:00
let them chat! (spectators)
This commit is contained in:
@@ -19,9 +19,9 @@ function getNickname(socket) {
|
||||
function setNickname(socket, nickname) {
|
||||
if (!socket) return null;
|
||||
const role = getRole(socket);
|
||||
if (role === 'spectator') {
|
||||
throw new Error('Spectators cannot set nicknames');
|
||||
}
|
||||
// if (role === 'spectator') {
|
||||
// throw new Error('Spectators cannot set nicknames');
|
||||
// }
|
||||
const value = sanitizeNickname(nickname);
|
||||
if (!value) {
|
||||
throw new Error('Nickname required');
|
||||
|
||||
Reference in New Issue
Block a user