From 82d6a5156c4c58dba3f8fa02a3b9fc120938612d Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sun, 7 Oct 2018 19:48:54 +0200 Subject: [PATCH] fix recipient for events --- distbot/bot/action_worker.py | 2 +- distbot/bot/worker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.2