React native & sync manager

I’ve been struggling to send a message with the SyncManager with this example code.
I can CRUD channels and messages in my view but sending doesnt work.

My code is

const send = (messageContent: string) => {
        const params = new sb.UserMessageParams()
        params.message = messageContent
        const pendingMessage = channel.sendUserMessage(
          params,
          (message, error) => {
            if (error) {
              console.error(error)
              return
            }
            // @TODO : what happens when message fails to send
            // collection.handleSendMessageResponse(error, message)
          }
        )
        
        console.log({ pendingMessage })
        collection.appendMessage(pendingMessage)
      }

And I get the following errors :

TypeError: Cannot assign to read only property 'pendingResolveBottom' of object '#<Object>'
TypeError: Cannot assign to read only property 'sendingStatus' of object '#<Object>

Can somebody help?

Hello @SafiyyaBabio,

Could you provide us with the version of the Core SDK and SyncManager SDK you’re using? I’ll see if I can reproduce this.

Thanks,
Tyler

Thanks @Tyler , here is

"sendbird": "3.0.129",
"sendbird-syncmanager": "1.1.22",

Any updates on this @Tyler ?

@SafiyyaBabio, I apologize for the delay. Let me see if I can take a look at this today.

1 Like