return bot_reply("Sorry, this channel doesn't appear to "
+ "be a hunt or puzzle channel")
+ # We used puzzle (if available) to select the initial round(s)
+ puzzle = puzzle_for_channel(turb, channel_id)
+ initial_rounds = None
+ if puzzle:
+ initial_rounds=puzzle.get("rounds", None)
+
round_options = hunt_rounds(turb, hunt['hunt_id'])
if len(round_options):
round_options_block = [
multi_select_block("Round(s)", "rounds",
"Existing round(s) this puzzle belongs to",
- round_options)
+ round_options,
+ initial_options=initial_rounds)
]
else:
round_options_block = []
blocks = hunt_blocks(turb, hunt, puzzle_status=status, search_terms=terms)
- requests.post(response_url,
- json = { 'blocks': blocks },
- headers = {'Content-type': 'application/json'}
- )
+ for block in blocks:
+ requests.post(response_url,
+ json = { 'blocks': block },
+ headers = {'Content-type': 'application/json'}
+ )
return lambda_ok
limit_to_rounds=puzzle.get('rounds', [])
)
- requests.post(response_url,
- json = { 'blocks': blocks },
- headers = {'Content-type': 'application/json'}
- )
+ for block in blocks:
+ requests.post(response_url,
+ json = { 'blocks': block },
+ headers = {'Content-type': 'application/json'}
+ )
return lambda_ok