mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
exempt spectators oops...
This commit is contained in:
@@ -152,7 +152,7 @@ setInterval(() => {
|
|||||||
io.sockets.sockets.forEach((socket) => {
|
io.sockets.sockets.forEach((socket) => {
|
||||||
if (!socket?.id) return;
|
if (!socket?.id) return;
|
||||||
const role = getRole(socket);
|
const role = getRole(socket);
|
||||||
if (role === 'admin' || role === 'lockdown') return;
|
if (role === 'admin' || role === 'lockdown' || role === 'spectator') return;
|
||||||
const connectedAt = Number(socket?.data?.connectedAt || 0);
|
const connectedAt = Number(socket?.data?.connectedAt || 0);
|
||||||
const lastClientIdentifyAt = Number(socket?.data?.lastClientIdentifyAt || 0);
|
const lastClientIdentifyAt = Number(socket?.data?.lastClientIdentifyAt || 0);
|
||||||
const referenceTs = lastClientIdentifyAt || connectedAt;
|
const referenceTs = lastClientIdentifyAt || connectedAt;
|
||||||
|
|||||||
Reference in New Issue
Block a user