Avoid sending empty messages

This commit is contained in:
Simon Ser 2020-04-25 10:33:52 +02:00
parent 55e1107e38
commit 038d175f0e
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -191,6 +191,9 @@ composerElt.onsubmit = function(event) {
}
var target = activeBuffer.name;
var text = composerInputElt.value;
if (!text) {
return;
}
var msg = { command: "PRIVMSG", params: [target, text] };
ws.send(formatMessage(msg));
msg.prefix = { name: server.nick };