mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-01 00:18:18 +02:00
Merge pull request #208 from chrisedington/ce/slack-archive-fix
Fix: Don't include archived Slack channels
This commit is contained in:
commit
4958962855
@ -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"""
|
||||
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"])
|
||||
return channels
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user