Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginate through users #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sej3506
Copy link

@sej3506 sej3506 commented Apr 27, 2022

Problem

If there are/have been over 1000 users in an organization, the
eligible_user_ids method in loads_slack_channel_members would only
retrieve the first 1000.

This means that any member of the channel that is not included in the
first 1000 users of list_users will not be included for matching.

Solution

This change adds a method to follow any pagination cursors and combine
user pages together to ensure we have a complete user list to compare
to when intersecting with the channel member list.

This change also adds a limit of 200 for user retrievable, as
recommended by Slack's API guide.

If there are/have been over 1000 users in an organization, the
eligible_user_ids method in loads_slack_channel_members would only
retrieve the first 1000.

This change adds a method to follow any pagination cursors and combine
user pages together to ensure we have a complete user list to compare
to when intersecting with the channel member list.

This change also adds a limit of 200 for user retrievable, as
recommended by Slack's API guide.
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.

1 participant