Skip to content

Conversation

@xsahil03x
Copy link
Member

Submit a pull request

Github Issue: #2034

Description of the pull request

This PR fixes a case in persistence.getChannelStates method where the pagination.offset can be greater than the channelStates.length which results in an exception. The fix now clamps the offset before applying it to the channelStates.

@xsahil03x xsahil03x linked an issue May 7, 2025 that may be closed by this pull request
1 task
@xsahil03x xsahil03x force-pushed the fix/persistence-channel-state-offset branch from f33593b to 8113449 Compare May 7, 2025 17:11
@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 63.17%. Comparing base (1645c7b) to head (8113449).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...stence/lib/src/stream_chat_persistence_client.dart 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2247   +/-   ##
=======================================
  Coverage   63.17%   63.17%           
=======================================
  Files         402      402           
  Lines       25228    25228           
=======================================
+ Hits        15937    15939    +2     
+ Misses       9291     9289    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x xsahil03x merged commit 2793863 into master May 8, 2025
16 of 17 checks passed
@xsahil03x xsahil03x deleted the fix/persistence-channel-state-offset branch May 8, 2025 11:48
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.

StreamChatPersistenceClient.getChannelStates() issue

3 participants