]> Dogcows Code - chaz/chatty/blobdiff - lib/Chatty/Controller/Chat.pm
validate sent chat to avoid spurious join messages
[chaz/chatty] / lib / Chatty / Controller / Chat.pm
index 911c127ed95b18229c059b5891e86599a57e9a6d..01cb23410c479a48155ffae17e10fecc46e5940f 100644 (file)
@@ -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');
This page took 0.019827 seconds and 4 git commands to generate.