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

Bug: ConversationV2.messages() doesn't use pagination #104

Closed
michaelx11 opened this issue May 17, 2023 · 5 comments
Closed

Bug: ConversationV2.messages() doesn't use pagination #104

michaelx11 opened this issue May 17, 2023 · 5 comments
Assignees
Labels
bug Something isn't working P2 Priority 2

Comments

@michaelx11
Copy link
Contributor

michaelx11 commented May 17, 2023

Describe the bug

AFFECTED VERSION: 0.1.3-beta0 (from cocoapods-integration)

As mentioned in xmtp/xmtp-react-native#34 - a React Native SDK user noticed only 100 messages are being pulled for a convo. This lines up with the code which appears to push pagination responsibilities to the consumer, but requiring them to use Date cutoffs.

https://github.com/xmtp/xmtp-ios/blob/d9463d7/Sources/XMTP/ConversationV2.swift#L107

Expected behavior

The consumer mentioned .messages() without params would be expected to return all messages in the conversation. This is their perceived expected behavior.

Steps to reproduce the bug

No response

Resolution

Need to confirm whether or not this is still an issue on 0.2.1-alpha0

@michaelx11 michaelx11 added the bug Something isn't working label May 17, 2023
@michaelx11
Copy link
Contributor Author

Still an issue in 0.2.1-alpha0

@michaelx11
Copy link
Contributor Author

If we want to replicate listInvitations() which does pull all possible messages, we need to pass in a nil pagination:

@jazzz jazzz added the P2 Priority 2 label Jun 5, 2023
@neekolas
Copy link
Contributor

@nplasterer this was fixed in xmtp/xmtp-android#74, right?

@nplasterer
Copy link
Contributor

@neekolas the fix you have linked is for conversation.list() only returning 100 conversations. I don't believe I've fixed or written a test for messages. This is likely still a bug unless @dmccartney fixed it with the batchQuery work which did land last week.

@nplasterer
Copy link
Contributor

This should be fixed on iOS now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Priority 2
Projects
None yet
Development

No branches or pull requests

5 participants