X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot%2Finteraction.py;h=69d4f2505d52a1fd1905b3c36298bfc8b068c466;hb=0bab5b46f6a9d98b2e7f1c8b14eda73569d8e4b9;hp=392574d89f1d8c9405dd18fee541a8815aea720f;hpb=9a0a686586122ccb3c44c1cf61ee2addfe58cf08;p=turbot diff --git a/turbot/interaction.py b/turbot/interaction.py index 392574d..69d4f25 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -146,7 +146,6 @@ def edit_puzzle_button(turb, payload): """Handler for the action of user pressing an edit_puzzle button""" action_id = payload['actions'][0]['action_id'] - response_url = payload['response_url'] trigger_id = payload['trigger_id'] (hunt_id, sort_key) = action_id.split('-', 1) @@ -154,9 +153,6 @@ def edit_puzzle_button(turb, payload): puzzle = find_puzzle_for_sort_key(turb, hunt_id, sort_key) if not puzzle: - requests.post(response_url, - json = {"text": "Error: Puzzle not found!"}, - headers = {"Content-type": "application/json"}) return bot_reply("Error: Puzzle not found.") return edit_puzzle(turb, puzzle, trigger_id) @@ -387,15 +383,11 @@ def edit_hunt_button(turb, payload): """Handler for the action of user pressing an edit_hunt button""" hunt_id = payload['actions'][0]['action_id'] - response_url = payload['response_url'] trigger_id = payload['trigger_id'] - hunt = find_hunt_for_hunt_id(hunt_id) + hunt = find_hunt_for_hunt_id(turb, hunt_id) if not hunt: - requests.post(response_url, - json = {"text": "Error: Hunt not found!"}, - headers = {"Content-type": "application/json"}) return bot_reply("Error: Hunt not found.") return edit_hunt(turb, hunt, trigger_id)