]> git.cworth.org Git - turbot/blobdiff - turbot_lambda/turbot_lambda.py
Defer all sheet creation until after the channel is created
[turbot] / turbot_lambda / turbot_lambda.py
index 7469222cb4bd84e6fecf3489551ac528e42fa905..e19e96d801ab0b0ea7d7f502e2c66fa341883b1b 100644 (file)
@@ -124,10 +124,11 @@ def url_verification_handler(turb, body):
     }
 
 def event_callback_handler(turb, body):
-    type = body['event']['type']
+    event = body['event']
+    type = event['type']
 
     if type in turbot.events.events:
-        return turbot.events.events[type](turb, body)
+        return turbot.events.events[type](turb, event)
     return error("Unknown event type: {}".format(type))
 
 def turbot_interactive_or_slash_command(turb, event, context):