don't send blank chats to the server

This commit is contained in:
Andy Janata 2012-03-12 19:49:36 -07:00
parent f9b6de36d0
commit 2d42710270
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ function chat_keyup(e) {
*/
function chatsubmit_click() {
var text = $.trim($("#chat").val());
if (text == "") {
return;
}
// TODO when I get multiple channels working, this needs to know active and pass it
cah.Ajax.build(cah.$.AjaxOperation.CHAT).withMessage(text).run();
cah.log.status("<" + cah.nickname + "> " + text);