xmtp / xmtp-react-native

A package you can use to build with XMTP in a React Native or Expo app.
MIT License
40 stars 19 forks source link

Bug: Adding a limit to group messages method causes direction to be ignored #389

Open alexrisch opened 4 months ago

alexrisch commented 4 months ago

Describe the bug

Only Seen on iOS

   A group with 3 messages
   When requesting without pagination it will return in the expected order

   Once setting limit the first message will be returned 
    await group.messages(false, {
      limit: 1,
    });
    Setting either direction "direction: 'SORT_DIRECTION_DESCENDING'," or 'SORT_DIRECTION_ASCENDING' the first message will still be returned

Expected behavior

Setting limit should not change the direction of pagination

Steps to reproduce the bug

No response