From 4fa299ff158940887e1aaf290a99923a5edc0a5c Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Tue, 12 Sep 2023 22:21:50 +0530 Subject: [PATCH] chore: Disable archived channels from the slack integration (#7904) --- lib/integrations/slack/channel_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/integrations/slack/channel_builder.rb b/lib/integrations/slack/channel_builder.rb index 062452a4b..1edacf8f7 100644 --- a/lib/integrations/slack/channel_builder.rb +++ b/lib/integrations/slack/channel_builder.rb @@ -24,7 +24,7 @@ class Integrations::Slack::ChannelBuilder end def channels - conversations_list = slack_client.conversations_list(types: 'public_channel, private_channel') + conversations_list = slack_client.conversations_list(types: 'public_channel, private_channel', exclude_archived: true) channel_list = conversations_list.channels while conversations_list.response_metadata.next_cursor.present? conversations_list = slack_client.conversations_list(cursor: conversations_list.response_metadata.next_cursor)