]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Fix storage of rounds for new puzzle creation
[turbot] / turbot / interaction.py
index 8ccd24755af036114326b77af30de595e8cd91fe..d8a252b316d13363d45950adf8b8ad2169f1ba17 100644 (file)
@@ -466,7 +466,7 @@ def puzzle_submission(turb, payload, metadata):
     # Add any new rounds to the database
     if new_rounds:
         for round in new_rounds.split(','):
-            rounds += round
+            rounds.append(round)
             turb.table.put_item(
                 Item={
                     'hunt_id': hunt_id,
@@ -520,6 +520,10 @@ def set_channel_topic(turb, puzzle):
     if state:
         description += " {}".format(state)
 
+    # Slack only allows 250 characters for a topic
+    if len(description) > 250:
+        description = description[:247] + "..."
+
     turb.slack_client.conversations_setTopic(channel=channel_id,
                                              topic=description)