merasabkuch commited on
Commit
2a260f0
1 Parent(s): 1c677e7

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -348,8 +348,8 @@ wss.on('connection', (ws) => {
348
 
349
  switch (parsedMessage.type) {
350
  case 'joinRoom':
351
- if (!roomId || !userId) {
352
- ws.send(JSON.stringify({ error: 'Invalid room or user ID' }));
353
  return;
354
  }
355
 
 
348
 
349
  switch (parsedMessage.type) {
350
  case 'joinRoom':
351
+ if (!roomId || !(userId || apiKey) {
352
+ ws.send(JSON.stringify({ error: 'Invalid room or user ID or apikey' }));
353
  return;
354
  }
355