Skip to content

Commit 194dcb5

Browse files
authored
update slack redirect + token missing check (#3179)
* update slack redirect + token missing check * reset time
1 parent bf291d0 commit 194dcb5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

backend/danswer/danswerbot/slack/listener.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def _manage_clients_per_tenant(
197197
return
198198

199199
tokens_exist = tenant_bot_pair in self.slack_bot_tokens
200-
tokens_changed = slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair]
200+
tokens_changed = (
201+
tokens_exist and slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair]
202+
)
201203
if not tokens_exist or tokens_changed:
202204
if tokens_exist:
203205
logger.info(

web/src/app/admin/bots/SlackTokensForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const SlackTokensForm = ({
5151
: "Successfully created Slack Bot!",
5252
type: "success",
5353
});
54-
router.push(`/admin/bots/${botId}}`);
54+
router.push(`/admin/bots/${encodeURIComponent(botId)}`);
5555
} else {
5656
const responseJson = await response.json();
5757
const errorMsg = responseJson.detail || responseJson.message;

0 commit comments

Comments
 (0)