]> git.cworth.org Git - turbot/blobdiff - turbot/interaction.py
Live fix for apparently overflowing the Slack message limit with hunt details
[turbot] / turbot / interaction.py
index d87d27ac1a6827a9da4f6392245e96328440de6e..94787b40fbc28e15c7773f0ca497b5dcf4bea1b9 100644 (file)
@@ -1269,10 +1269,11 @@ def hunt(turb, body, args):
 
     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
 
@@ -1343,10 +1344,11 @@ def round(turb, body, args):
                          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