mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-06 18:14:35 +02:00
Fix: Don't include archived Slack channels, as they cannot be called on conversations.join API
This commit is contained in:
@@ -44,10 +44,10 @@ def get_channel_info(client: WebClient, channel_id: str) -> ChannelType:
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_channels(client: WebClient) -> list[ChannelType]:
|
def get_channels(client: WebClient, exclude_archived: bool = True) -> list[ChannelType]:
|
||||||
"""Get all channels in the workspace"""
|
"""Get all channels in the workspace"""
|
||||||
channels: list[dict[str, Any]] = []
|
channels: list[dict[str, Any]] = []
|
||||||
for result in _make_slack_api_call(client.conversations_list):
|
for result in _make_slack_api_call(client.conversations_list, exclude_archived=exclude_archived):
|
||||||
channels.extend(result["channels"])
|
channels.extend(result["channels"])
|
||||||
return channels
|
return channels
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user