]> git.cworth.org Git - turbot/commitdiff
Reduce the burst of noise from turbot on channel creation
authorCarl Worth <cworth@cworth.org>
Thu, 22 Oct 2020 22:52:04 +0000 (15:52 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 22 Oct 2020 22:52:04 +0000 (15:52 -0700)
This takes the number of messages it spews from 5 down to 2, so
reducing a bunch of extraneous noise.

turbot/events.py

index ca2fd71fa1d9b787fe23aeb19b32527370715c6a..c876b15217e2e252d4683782c1a1599f0af661ef 100644 (file)
@@ -233,9 +233,6 @@ def puzzle_channel_created(turb, puzzle_channel_name, puzzle_channel_id):
     if not item['url']:
         del item['url']
 
-    # Get the puzzle's name into the channel description
-    set_channel_description(turb, item)
-
     # Before launching into sheet creation, indicate that we're doing this
     # in the database. This way, if we take too long to create the sheet
     # and Slack retries the event, that next event will see this 'pending'
@@ -250,11 +247,6 @@ def puzzle_channel_created(turb, puzzle_channel_name, puzzle_channel_id):
     item['sheet_url'] = sheet['url']
     puzzle_table.put_item(Item=item)
 
-    # Message the channel with the URL of the puzzle's sheet
-    turb.slack_client.chat_postMessage(channel=puzzle_channel_id,
-                                       text="Sheet created for this puzzle: {}"
-                                       .format(sheet['url']))
-
     # Get the new sheet_url into the channel description
     set_channel_description(turb, item)