Skip to content

Commit 8ba13ef

Browse files
committed
Bugfix: Use normal slack creds to post invite error instead of admin
1 parent d29271b commit 8ba13ef

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pybot/endpoints/api/slack_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ async def invite(request: SlackApiRequest, app: SirBot):
3939
4040
:return: The request response from slack
4141
"""
42-
slack = app.plugins["admin_slack"].api
42+
admin_slack = app.plugins["admin_slack"].api
43+
slack = app.plugins["slack"].api
4344
body = await request.json()
4445

4546
if "email" not in body:
4647
return {"error": "Must contain `email` JSON value"}
4748
email = body["email"]
4849

4950
try:
50-
response = await slack.query(
51+
response = await admin_slack.query(
5152
url=ROOT_URL + "users.admin.invite", data={"email": email}
5253
)
5354
return response

0 commit comments

Comments
 (0)