X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot_lambda%2Fturbot_lambda.py;fp=turbot_lambda%2Fturbot_lambda.py;h=8365739fa24e5e7881d282a79ddd4b0d47663ee1;hb=3cb02ee6f355f536960c8059f8f91c73fe20703f;hp=59312c8b2e1e19e7b573b7e108cc2458384cb286;hpb=dd449afa51bfba220cc82df2f36dce8934287647;p=turbot diff --git a/turbot_lambda/turbot_lambda.py b/turbot_lambda/turbot_lambda.py index 59312c8..8365739 100644 --- a/turbot_lambda/turbot_lambda.py +++ b/turbot_lambda/turbot_lambda.py @@ -10,8 +10,7 @@ from types import SimpleNamespace from google.auth.transport.requests import Request from googleapiclient.discovery import build -import turbot.actions -import turbot.commands +import turbot.interaction import turbot.events ssm = boto3.client('ssm') @@ -166,7 +165,7 @@ def turbot_interactive(turb, payload): if type == 'block_actions': return turbot_block_action(turb, payload) if type == 'view_submission': - return turbot.actions.view_submission(turb, payload) + return turbot.interaction.view_submission(turb, payload) if type == 'shortcut': return turbot_shortcut(turb, payload); return error("Unrecognized interactive type: {}".format(type)) @@ -188,10 +187,10 @@ def turbot_block_action(turb, payload): avalue = action['value'] if ( - atype in turbot.actions.actions - and avalue in turbot.actions.actions[atype] + atype in turbot.interaction.actions + and avalue in turbot.interaction.actions[atype] ): - return turbot.actions.actions[atype][avalue](turb, payload) + return turbot.interaction.actions[atype][avalue](turb, payload) return error("Unknown action of type/value: {}/{}".format(atype, avalue)) def turbot_shortcut(turb, payload): @@ -216,7 +215,7 @@ def turbot_slash_command(turb, body): else: args = '' - if command in turbot.commands.commands: - return turbot.commands.commands[command](turb, body, args) + if command in turbot.interaction.commands: + return turbot.interation.commands[command](turb, body, args) return error("Command {} not implemented".format(command))