Checagem de palavras vazias adicionado
This commit is contained in:
parent
9dc5f566ee
commit
667e0f6e66
7
index.js
7
index.js
|
@ -244,6 +244,13 @@ wss.on('connection', ws => {
|
|||
}
|
||||
|
||||
// Certo, é a vez deste cliente.
|
||||
|
||||
// A palavra enviada está vazia?
|
||||
if (resposta.extra.palavra.replace(/ /g, "") === ""){
|
||||
ws.send(JSON.stringify(new Resposta("PEDIDO_CANCELADO", "SERVIDOR", "PALAVRA_OU_TEMA_PROIBIDO")));
|
||||
return;
|
||||
}
|
||||
|
||||
cliente.uas = Date.now();
|
||||
salaObj.uas = Date.now();
|
||||
// A sala está com o filtro de temas adultos habilitado?
|
||||
|
|
Reference in New Issue