From 6ea1a40d0fdf0182e2b3154ffc7d4bc91e2a9541 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 16 Oct 2020 18:06:31 -0700 Subject: [PATCH] Invite user to new hunt channel when they create a hunt Kind of silly to leave out the initiating user, you see. --- turbot/actions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/turbot/actions.py b/turbot/actions.py index ca4aa02..30ae676 100644 --- a/turbot/actions.py +++ b/turbot/actions.py @@ -46,6 +46,7 @@ def new_hunt_submission(turb, payload): 'statusCode': 400 } + user_id = payload['user']['id'] channel_id = response['channel']['id'] turb.hunts_table = turb.db.Table("hunts") @@ -59,6 +60,8 @@ def new_hunt_submission(turb, payload): } ) + turb.slack_client.conversations_invite(channel=channel_id, users=user_id) + return { 'statusCode': 200, } -- 2.43.0