For better grouping of related puzzles in the channel list
def puzzle_channel_name(puzzle):
"""Compute the channel name for a puzzle"""
+ round = ''
+ if 'rounds' in puzzle:
+ round = '-' + puzzle_id_from_name(puzzle['rounds'][0])
+
+ meta = ''
+ if puzzle['type'] == 'meta':
+ meta = '-m'
+
# Note: We don't use puzzle['puzzle_id'] here because we're keeping
# that as a persistent identifier in the database. Instead we
# create a new ID-like identifier from the current name.
- channel_name = "{}-{}".format(
+ channel_name = "{}{}{}-{}".format(
puzzle['hunt_id'],
+ round,
+ meta,
puzzle_id_from_name(puzzle['name'])
)