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

feat: reaction details are now paginated, and use reaction_groups #640

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

szuperaz
Copy link
Contributor

@szuperaz szuperaz commented Sep 16, 2024

This PR introduces two important updates to reactions:

  • The SDK now relies on message.reaction_groups field which allows ordering existing reactions based on first_reaction_at field (for example in the below screenshot the first reaction is 😮 because it was the first type of reaction a user added to the message)

Screenshot 2024-09-16 at 16 05 56

  • The SDK utilizes the new queryReactions endpoint which means the SDK can now retrieve all reactions of a message, not just the last 1200.

The SDK now requires a minimum version of [email protected]

The release is non-breaking, but the following fields are now deprecated, so you can make your customization future-proof by updating them:

  • If you use the stream-message-reactions component in a custom component do the following:
    • Remove the messageReactionCounts input, and use the messageReactionGroups instead
    • Remove the latestReactions input, the component no longer uses it
  • If you have a custom customReactionClickHandler you should use the messageReactionsService.queryReactions method to fetch reactions (this endpoint uses pagination as opposed to channelService.getMessageReactions() which only gets the last 1200 reactions). If you want to use some ready-made-components for the pagination, you can checkout the stream-user-list and stream-paginated-list components

@szuperaz szuperaz changed the title feat: reaction details are now paginated feat: reaction details are now paginated, and use reaction_groups Sep 16, 2024
@szuperaz szuperaz force-pushed the reactions-v2 branch 5 times, most recently from 4fd05a6 to 4e5985f Compare September 16, 2024 15:09
@szuperaz szuperaz merged commit f64709f into master Sep 16, 2024
3 checks passed
@szuperaz szuperaz deleted the reactions-v2 branch September 16, 2024 15:18
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