From: Thorsten Date: Sun, 7 Oct 2018 17:48:54 +0000 (+0200) Subject: fix recipient for events X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=82d6a5156c4c58dba3f8fa02a3b9fc120938612d;p=urlbot-v3.git fix recipient for events --- diff --git a/distbot/bot/action_worker.py b/distbot/bot/action_worker.py index c800760..4ceaa3d 100644 --- a/distbot/bot/action_worker.py +++ b/distbot/bot/action_worker.py @@ -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) diff --git a/distbot/bot/worker.py b/distbot/bot/worker.py index d4bdcf8..cc42b71 100644 --- a/distbot/bot/worker.py +++ b/distbot/bot/worker.py @@ -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: