From 4e19bdc2f59622b535efe75d5c635e48339b0214 Mon Sep 17 00:00:00 2001 From: knotteye Date: Sun, 10 Nov 2019 09:07:23 -0600 Subject: [PATCH] Ignore empty messages in socket.io --- src/http.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http.ts b/src/http.ts index 49f4a42..65e9f52 100644 --- a/src/http.ts +++ b/src/http.ts @@ -182,6 +182,7 @@ async function init(satyr: any, port: number, ircconf: any){ } }); socket.on('MSG', (data) => { + if(data.msg === "") return; io.to(data.room).emit('MSG', {nick: socket.nick, msg: data.msg}); if(ircconf.enable) irc.send(socket.nick, data.room, data.msg); });