From b53e61e27241ce6a44811e72c85c996f51b9fbb9 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 13 Oct 2020 13:57:52 -0700 Subject: [PATCH] Add a "new_hunt" name to the button we place on the app's home view This will be more reliable to match on than any particular label text. --- turbot/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/turbot/views.py b/turbot/views.py index 122d92c..c7c8ac7 100644 --- a/turbot/views.py +++ b/turbot/views.py @@ -18,14 +18,15 @@ def actions(*elements): "elements": list(elements) } -def button(label): +def button(label, name): return { "type": "button", "text": { "type": "plain_text", "text": label, "emoji": True - } + }, + "value": name } def home(user_id, body): @@ -39,6 +40,6 @@ def home(user_id, body): "type": "home", "blocks": [ section(text("This is (or soon will be) a list of available puzzle hunts)")), - actions(button("New hunt")) + actions(button("New hunt", "new_hunt")) ] } -- 2.45.2