Server now prevents empty chats.
This commit is contained in:
parent
7aeb4e9d0e
commit
7b054b235d
|
|
@ -212,6 +212,12 @@ class chatHandler{
|
|||
* @param {chat} chat - Chat Object representing the message to broadcast to the given channel
|
||||
*/
|
||||
relayChatObject(chan, chat){
|
||||
//If we have an empty chat
|
||||
if(chat.msg.length <= 0){
|
||||
//Drop it
|
||||
return;
|
||||
}
|
||||
|
||||
//Send out chat
|
||||
this.server.io.in(chan).emit("chatMessage", chat);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue