Skip to content

Conversation

KamikazeZirou
Copy link
Contributor

@KamikazeZirou KamikazeZirou commented Aug 7, 2025

resolve #1468

Summary of changes

  • add GetUsersOptionCursor as a GetUsersOption to specify the cursor of users.list
  • add a field Cursor to UserPagination to return the next page cursor to SDK clients after users.list
Pull Request Guidelines

These are recommendations for pull requests.
They are strictly guidelines to help manage expectations.

PR preparation

Run make pr-prep from the root of the repository to run formatting, linting and tests.

Should this be an issue instead
  • is it a convenience method? (no new functionality, streamlines some use case)
  • exposes a previously private type, const, method, etc.
  • is it application specific (caching, retry logic, rate limiting, etc)
  • is it performance related.
API changes

Since API changes have to be maintained they undergo a more detailed review and are more likely to require changes.

  • no tests, if you're adding to the API include at least a single test of the happy case.
  • If you can accomplish your goal without changing the API, then do so.
  • dependency changes. updates are okay. adding/removing need justification.
Examples of API changes that do not meet guidelines:
  • in library cache for users. caches are use case specific.
  • Convenience methods for Sending Messages, update, post, ephemeral, etc. consider opening an issue instead.

@KamikazeZirou KamikazeZirou force-pushed the feature/GetUsers-With-Cursor branch from 7e46e30 to 6a5d641 Compare August 18, 2025 15:17
@KamikazeZirou KamikazeZirou marked this pull request as ready for review August 18, 2025 15:28
@KamikazeZirou KamikazeZirou force-pushed the feature/GetUsers-With-Cursor branch from 6a5d641 to ec61ba9 Compare August 18, 2025 15:29
@KamikazeZirou KamikazeZirou marked this pull request as draft August 19, 2025 07:24
Replace ResponseMetadata-based pagination with direct cursor handling
in UserPagination struct. This simplifies the pagination logic and
provides more explicit control over cursor state.

Changes:
- Add GetUsersOptionCursor() to set pagination cursor
- Replace previousResp field with Cursor and complete fields
- Update Next() method to use cursor directly from API response
- Add test coverage for cursor-based pagination scenarios
@KamikazeZirou KamikazeZirou force-pushed the feature/GetUsers-With-Cursor branch from ec61ba9 to bbf9c45 Compare August 19, 2025 15:01
@KamikazeZirou KamikazeZirou marked this pull request as ready for review August 19, 2025 15:02
@nlopes nlopes self-requested a review September 14, 2025 16:33
@nlopes nlopes self-assigned this Sep 14, 2025
@nlopes nlopes merged commit d1727cd into slack-go:master Sep 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support pagination for getting users
2 participants