import boto3
import requests
import json
-import os
import pickle
from types import SimpleNamespace
from google.auth.transport.requests import Request
ssm = boto3.client('ssm')
-response = ssm.get_parameter(Name='SLACK_SIGNING_SECRET', WithDecryption=True)
-slack_signing_secret = response['Parameter']['Value']
-os.environ['SLACK_SIGNING_SECRET'] = slack_signing_secret
-
# Note: Late import here to have the environment variable above available
from turbot.slack import slack_is_valid_request # noqa
if type == 'view_submission':
return turbot.interaction.view_submission(turb, payload)
if type == 'shortcut':
- return turbot_shortcut(turb, payload);
+ return turbot_shortcut(turb, payload)
return error("Unrecognized interactive type: {}".format(type))
def turbot_block_action(turb, payload):
args = ''
if command in turbot.interaction.commands:
- return turbot.interation.commands[command](turb, body, args)
+ return turbot.interaction.commands[command](turb, body, args)
return error("Command {} not implemented".format(command))