From 4f2cdadc3550422ed350dffed9123220b93d8356 Mon Sep 17 00:00:00 2001 From: Aric Lasry Date: Wed, 8 Nov 2023 10:54:29 +0100 Subject: [PATCH] Allow DM messages to the Slack bot (#2429) --- connectors/src/connectors/slack/bot.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/connectors/src/connectors/slack/bot.ts b/connectors/src/connectors/slack/bot.ts index 344aa3612002..c999e4b6c036 100644 --- a/connectors/src/connectors/slack/bot.ts +++ b/connectors/src/connectors/slack/bot.ts @@ -143,17 +143,6 @@ async function botAnswerMessage( slackThreadTs: string | null, connector: Connector ): Promise> { - const slackChannelsICanSee = (await getChannels(connector.id, false)) - .map((c) => c.id) - .flatMap((c) => (c ? [c] : [])); - if (!slackChannelsICanSee.includes(slackChannel)) { - return new Err( - new SlackExternalUserError( - "Sorry, but I can only answer to public channels." - ) - ); - } - let lastSlackChatBotMessage: SlackChatBotMessage | null = null; if (slackThreadTs) { lastSlackChatBotMessage = await SlackChatBotMessage.findOne({