}
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):