mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -04:00
let them chat! (spectators)
This commit is contained in:
@@ -75,10 +75,10 @@ function broadcastMessage(message) {
|
||||
|
||||
function handleIncoming({ text } = {}, socket, cb = () => {}) {
|
||||
const role = getRole(socket);
|
||||
if (role === 'spectator') {
|
||||
cb({ error: 'Spectators cannot chat' });
|
||||
return;
|
||||
}
|
||||
// if (role === 'spectator') {
|
||||
// cb({ error: 'Spectators cannot chat' });
|
||||
// return;
|
||||
// }
|
||||
const clean = typeof text === 'string' ? text.trim() : '';
|
||||
if (!clean) {
|
||||
cb({ error: 'Message required' });
|
||||
|
||||
Reference in New Issue
Block a user