]> git.parisson.com Git - teleforma.git/commitdiff
fix broadcast message command
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jul 2013 08:24:19 +0000 (10:24 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 15 Jul 2013 08:24:19 +0000 (10:24 +0200)
teleforma/management/commands/teleforma-broadcast-message.py

index 3b0c95912556607145e3cfb9c33ac7a4d5534afb..77b691df15a21eb0ca654eaca7c51ee67380f7c0 100644 (file)
@@ -6,14 +6,14 @@ from jqchat.models import *
 
 
 class Command(BaseCommand):
-    help = "Braodcast a jqchat message on the main site room by the admin"
-    args = "text username"
+    help = "Broadcast a jqchat message on the main site room by the admin"
+    args = "username text"
 
     def handle(self, *args, **options):
         text = args[1]
         username = args[0]
         user = User.objects.get(username=username)
-        rooms = Room.objects.filter(name__in='site')
+        rooms = Room.objects.filter(name__contains='site')
         for room in rooms:
             message = Message.objects.create_message(user, room, text)