validate sent chat to avoid spurious join messages
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 4 Jan 2012 02:50:17 +0000 (19:50 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 4 Jan 2012 02:50:17 +0000 (19:50 -0700)
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.022552 seconds and 4 git commands to generate.