X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fchatty;a=blobdiff_plain;f=lib%2FChatty%2FController%2FChat.pm;h=01cb23410c479a48155ffae17e10fecc46e5940f;hp=911c127ed95b18229c059b5891e86599a57e9a6d;hb=57f9bfbe0bd9f89a602c5f16bff100af84ae7f83;hpb=c89636c5063ea0bac876bf56248c97ade994cf8c diff --git a/lib/Chatty/Controller/Chat.pm b/lib/Chatty/Controller/Chat.pm index 911c127..01cb234 100644 --- a/lib/Chatty/Controller/Chat.pm +++ b/lib/Chatty/Controller/Chat.pm @@ -95,7 +95,8 @@ sub view :Chained(room) :PathPart('') :Args(1) { my $name = $c->user->obj->username; my $msg = $c->req->param('msg'); - if ($msg) { + if (defined $msg) { + return if $msg eq ''; $c->model('Meteor')->addMessage($room, "$name: $msg"); $c->stash->{json} = \1; $c->forward('View::JSON');