We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47e8188 commit b481280Copy full SHA for b481280
2 files changed
slackeventsapi/server.py
@@ -108,7 +108,8 @@ def event():
108
# Echo the URL verification challenge code back to Slack
109
if "challenge" in event_data:
110
return make_response(
111
- event_data.get("challenge"), 200, {"content_type": "application/json"}
+ {"challenge": event_data.get("challenge")}, 200,
112
+ {"content_type": "application/json"}
113
)
114
115
# Parse the Event payload and emit the event to the event listener
tests/test_server.py
@@ -53,7 +53,7 @@ def test_url_challenge(client):
53
}
54
55
assert res.status_code == 200
56
- assert bytes.decode(res.data) == "valid_challenge_token"
+ assert res.json.get("challenge") == "valid_challenge_token"
57
58
59
def test_no_request_timestamp_header(client):
0 commit comments