Skip to content

Commit 14821ba

Browse files
committed
Switch slack invite error notification to mods channel
1 parent fe705af commit 14821ba

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pybot/endpoints/api/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from slack import ROOT_URL
55
from typing import Optional
66

7-
from pybot.endpoints.slack.utils import TICKET_CHANNEL
7+
from pybot.endpoints.slack.utils import MODERATOR_CHANNEL
88
from pybot.endpoints.slack.utils.action_messages import (
99
TICKET_OPTIONS,
1010
not_claimed_attachment,
@@ -71,7 +71,7 @@ async def handle_slack_invite_error(email, error, slack):
7171
)
7272

7373
response = {
74-
"channel": TICKET_CHANNEL,
74+
"channel": MODERATOR_CHANNEL,
7575
"attachments": attachments,
7676
"text": "User Slack Invite Error",
7777
}

pybot/plugins/api/endpoints.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ async def slack_api(request):
1515
try:
1616
slack_request = SlackApiRequest.from_request(request)
1717
except FailedVerification:
18-
logger.info(f"Failed verification to API route {request.url} from {request.remote}")
18+
logger.info(
19+
f"Failed verification to API route {request.url} from {request.remote}"
20+
)
1921
return Response(status=401)
2022

2123
futures = list(_dispatch(api_plugin.routers["slack"], slack_request, request.app))

0 commit comments

Comments
 (0)