Skip to content

Conversation

m1kl0sh
Copy link

@m1kl0sh m1kl0sh commented Jul 3, 2025

Previously, we only retrieved the first page of results returned by the Slack Web API. This PR ensures that we read all pages returned by conversations_list.

Additionally, we now fetch private channels by calling conversations_list with the appropriate types parameter—public_channel first, then private_channel. We make two separate calls because, otherwise, the Slack Web API returns only public channels.

@m1kl0sh m1kl0sh changed the title fix: Retrieve all Slack channels visible fix: Retrieve all Slack channels visible to the client Jul 3, 2025
channels = result["channels"]
public_channels = self._get_all_channels_by_type()
private_channels = self._get_all_channels_by_type(
types="private_channel,mpim,im"
Copy link
Contributor

@eyurtsev eyurtsev Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the previous behavior? Was it limited to public channels only?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the previous behavior was limited to public channels only (i.e., Slack defaults the types parameter to public_channel). However, after some experimentation, it turned out that if you specify both public_channel and private_channel in the same call, only public channels are returned — hence the change above to separate these calls.

@eyurtsev eyurtsev self-assigned this Jul 7, 2025
@m1kl0sh
Copy link
Author

m1kl0sh commented Aug 5, 2025

@eyurtsev Let me know if there's anything else you'd like me to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants