xmtp / xmtp-react-native

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

Bug: error on a new conversation received, when subscribed to new conversations with `client.conversations.stream` #74

Closed krzysu closed 1 year ago

krzysu commented 1 year ago

Describe the bug

when subscribed to new conversations, on a new conversation received, the xmtp SDK throws

ERROR in listMessages [Error: The 1st argument cannot be cast to type String
→ Caused by: Cannot cast null to non-optional 'String']

Expected behavior

no error thrown

Steps to reproduce the bug

  1. setup a conversation list that uses client.conversations.stream(onConversation)
  2. create a new conversation from another account to the account that has a subscription set
  3. notice the Error in the dev console on the subscribed account
nplasterer commented 1 year ago

This should be fixed in the latest version https://github.com/xmtp/xmtp-react-native/releases/tag/v1.6.1