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: Listing messages does not respect the limit parameter #89

Closed
bselwe opened this issue Oct 10, 2023 · 0 comments · Fixed by #90
Closed

Bug: Listing messages does not respect the limit parameter #89

bselwe opened this issue Oct 10, 2023 · 0 comments · Fixed by #90
Assignees
Labels
bug Something isn't working

Comments

@bselwe
Copy link

bselwe commented Oct 10, 2023

Describe the bug

I'm trying to load the latest message for each conversation using client.listBatchMessage. This method seems to ignore the limit parameter and fetches all messages for each conversation instead.

It might be related to xmtp/xmtp-android#102.

Expected behavior

client.listBatchMessage respects the limit parameter in each conversation. It should return at most limit messages per each conversation.

Steps to reproduce the bug

final messages = await client.listBatchMessages(
  conversations,
  limit: 1,
);

/// For 8 conversations and the limit of 1, it returns 141 messages. 
/// Instead, it should return 1 message for each conversation (8 in total).
@bselwe bselwe added the bug Something isn't working label Oct 10, 2023
@nplasterer nplasterer self-assigned this Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants