mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-06 18:14:35 +02:00
Allow indexing of private channels
This commit is contained in:
@@ -62,7 +62,10 @@ def get_channels(
|
|||||||
"""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_paginated_slack_api_call(
|
for result in _make_paginated_slack_api_call(
|
||||||
client.conversations_list, exclude_archived=exclude_archived
|
client.conversations_list,
|
||||||
|
exclude_archived=exclude_archived,
|
||||||
|
# also get private channels the bot is added to
|
||||||
|
types=["public_channel", "private_channel"],
|
||||||
):
|
):
|
||||||
channels.extend(result["channels"])
|
channels.extend(result["channels"])
|
||||||
return channels
|
return channels
|
||||||
|
Reference in New Issue
Block a user