]> git.aero2k.de Git - urlbot-v3.git/commitdiff
fix recipient for events
authorThorsten <mail@aero2k.de>
Sun, 7 Oct 2018 17:48:54 +0000 (19:48 +0200)
committerThorsten <mail@aero2k.de>
Sun, 7 Oct 2018 17:48:54 +0000 (19:48 +0200)
distbot/bot/action_worker.py
distbot/bot/worker.py

index c800760081d771afd19781d4aa1454b462d8f727..4ceaa3d8e61ae81750b882c66b0481966f189d23 100644 (file)
@@ -123,7 +123,7 @@ class ActionThread(threading.Thread):
         if action.command:
             replay_body = json.dumps({
                 "from": None,
-                "to": None,
+                "to": action.recipient,
                 "body": ' '.join(action.command.split('.')[1:]),
             })
             process_message(routing_key=action.command, body=replay_body)
index d4bdcf8278c3bc496e2c5882653de16e145b11b6..cc42b71fb581d3517cadc157767b13eafcb4e1db 100644 (file)
@@ -79,7 +79,7 @@ class Worker(threading.Thread):
             logger.debug("no action taken")
             return
         action.sender = body["from"]
-        action.recipient = body["to"]
+        action.recipient = action.recipient or body["to"]
         send_action(self.actionqueue, action)
 
         if ack: