+ print("Generating turbot home view for hunt '" + hunt['hunt_id'] + "'")
+ if not hunt['active']:
+ print("Never mind, that hunt is not active.")
+ continue
+ print("Hunt '" + hunt['hunt_id'] + "' is active, moving forward.")
+ if user_id in slack_channel_members(turb.slack_client,
+ hunt['channel_id']):
+ my_hunt_blocks.append(hunt_link_block(turb, hunt))
+ else:
+ available_hunt_blocks.append(hunt_link_block(turb, hunt))
+
+ if len(my_hunt_blocks):
+ my_hunt_blocks = [
+ section_block(text_block("*Hunts you belong to:*")),
+ divider_block(),
+ * my_hunt_blocks
+ ]
+ else:
+ my_hunt_blocks.append([
+ section_block(text_block("You do not belong to any hunts"))
+ ])
+
+ if len(available_hunt_blocks):
+ available_hunt_blocks = [
+ section_block(text_block("*Hunts you can join:*")),
+ divider_block(),
+ * available_hunt_blocks
+ ]