Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
Hack: Try to get the correct config of the prefixed channel
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Co <alex.tuan@mindvalley.com>
  • Loading branch information
onimsha committed Sep 19, 2024
1 parent 9898ae4 commit 0d6a551
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/danswer/danswerbot/slack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ def get_slack_bot_config_for_channel(

slack_bot_configs = fetch_slack_bot_configs(db_session=db_session)
for config in slack_bot_configs:
if channel_name in config.channel_config[
"channel_names"
] or channel_name.startswith("inc-"):
if channel_name in config.channel_config["channel_names"]:
return config
if any(
channel_name.startswith("inc-")
for channel_name in config.channel_config["channel_names"]
):
return config

return None
Expand Down

0 comments on commit 0d6a551

Please sign in to comment.