From 62efd30a284cea34fc66406d1c7113dbdf130ee4 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Fri, 31 Jan 2025 12:16:58 -0600 Subject: [PATCH] Include the workflow user ID when trying to open a DM, workflow can't send there otherwise --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 36b77cc..74b0059 100644 --- a/main.py +++ b/main.py @@ -27,9 +27,8 @@ def useridToChannel( inputs: dict, fail: Fail, complete: Complete, logger: logging.Logger ): try: - user_id = inputs["user_id"] - log(user_id, "DEBUG") - channel_id = client.conversations_open(users=user_id)["channel"]["id"] + ids = [inputs["user_id"], inputs["workflow_id"]] + channel_id = client.conversations_open(users=ids)["channel"]["id"] complete({"channel_id": channel_id}) except: log(format_exc(), "ERROR")