X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot_lambda%2Fturbot_lambda.py;h=7622d82e46168cde94a539d42850d220d3866616;hb=4bca55ecc12eb56357e5a5279fece0adced30430;hp=7d8ac4d917cbd46dd148296397ce51ac18e7e1e0;hpb=3f55f48bd1a209854aef278b7e70e663cda4ee9a;p=turbot diff --git a/turbot_lambda/turbot_lambda.py b/turbot_lambda/turbot_lambda.py index 7d8ac4d..7622d82 100644 --- a/turbot_lambda/turbot_lambda.py +++ b/turbot_lambda/turbot_lambda.py @@ -66,6 +66,7 @@ db = boto3.resource('dynamodb') turb = SimpleNamespace() turb.slack_client = slack_client turb.db = db +turb.table = db.Table("turbot") turb.sheets = sheets turb.permissions = permissions @@ -153,7 +154,7 @@ def turbot_interactive_or_slash_command(turb, event, context): """Handler for Slack interactive things (buttons, shortcuts, etc.) as well as slash commands. - This function simply makes a quiuck determination of what we're looking + This function simply makes a quick determination of what we're looking at and then defers to either turbot_interactive or turbot_slash_command.""" # Both interactives and slash commands have a urlencoded body @@ -198,7 +199,10 @@ def turbot_block_action(turb, payload): action = actions[0] atype = action['type'] - avalue = action['value'] + if 'value' in action: + avalue = action['value'] + else: + avalue = '*' if ( atype in turbot.interaction.actions