def event_callback_handler(body):
type = body['event']['type']
- if type == 'app_home_opened':
- return turbot.events.app_home_opened(slack_client, body)
+ if type in turbot.events.events:
+ return turbot.events.events[type](slack_client, body)
return error("Unknown event type: {}".format(type))
def turbot_interactive_or_slash_command(event, context):