Skip to content

Commit

Permalink
Allow DM messages to the Slack bot (#2429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasryaric authored Nov 8, 2023
1 parent 4927d66 commit 4f2cdad
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions connectors/src/connectors/slack/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,6 @@ async function botAnswerMessage(
slackThreadTs: string | null,
connector: Connector
): Promise<Result<AgentGenerationSuccessEvent, Error>> {
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({
Expand Down

0 comments on commit 4f2cdad

Please sign in to comment.