Made /door ephemeral
This commit is contained in:
parent
6194ea59e4
commit
4ac4508108
1 changed files with 3 additions and 3 deletions
|
@ -65,8 +65,8 @@ def requires_token(token_name):
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
def mattermost_response(message):
|
def mattermost_response(message, ephemeral=False):
|
||||||
response_dict = {"response_type": response_setting,
|
response_dict = {"response_type": "ephemeral" if ephemeral else "in_channel",
|
||||||
"text": message}
|
"text": message}
|
||||||
return Response(json.dumps(response_dict), mimetype="application/json")
|
return Response(json.dumps(response_dict), mimetype="application/json")
|
||||||
|
|
||||||
|
@ -122,4 +122,4 @@ def slotmachien_request(username, command):
|
||||||
def door(username):
|
def door(username):
|
||||||
tokens = request.values.get('text').strip().split()
|
tokens = request.values.get('text').strip().split()
|
||||||
command = tokens[0].lower()
|
command = tokens[0].lower()
|
||||||
return mattermost_response(slotmachien_request(username, command))
|
return mattermost_response(slotmachien_request(username, command), ephemeral=True)
|
||||||
|
|
Loading…
Reference in a new issue