From 5248450b0f99f79f6352520ea3c74940c488c469 Mon Sep 17 00:00:00 2001 From: pablonyx Date: Sat, 8 Mar 2025 11:21:45 -0800 Subject: [PATCH] k --- backend/onyx/connectors/slack/connector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/onyx/connectors/slack/connector.py b/backend/onyx/connectors/slack/connector.py index f2479ee12..b5979d57a 100644 --- a/backend/onyx/connectors/slack/connector.py +++ b/backend/onyx/connectors/slack/connector.py @@ -674,7 +674,7 @@ class SlackConnector(SlimConnector, CheckpointConnector): """ 1. Verify the bot token is valid for the workspace (via auth_test). 2. Ensure the bot has enough scope to list channels. - 3. Check that every channel specified in self.channels exists. + 3. Check that every channel specified in self.channels exists (only when regex is not enabled). """ if self.client is None: raise ConnectorMissingCredentialError("Slack credentials not loaded.") @@ -704,8 +704,8 @@ class SlackConnector(SlimConnector, CheckpointConnector): ) raise UnexpectedError(f"Slack API returned a failure: {error_msg}") - # 3) If channels are specified, verify each is accessible - if self.channels: + # 3) If channels are specified and regex is not enabled, verify each is accessible + if self.channels and not self.channel_regex_enabled: accessible_channels = get_channels( client=self.client, exclude_archived=True,