ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

onMessage Listener: Sent message from one party is not being received by other party, #292

Closed natalialuzuriaga closed 2 years ago

natalialuzuriaga commented 2 years ago

Hi there,

I am developing a React Native app using Expo and am using react-native-connectycube version 3.14.0.

I'm encountering an issue where when both parties are connected to ConnectyCube, the messages being sent from one party are not being received by the other party.

I think this might have to do with the onMessage listener. I implemented the listeners exactly the same way as the ChatService.js service file in the React Native Samples. I am receiving nothing from the onMessage listener when the message is sent.

Any guidance would be much appreciated!

Below are the logs for when I send a message:

Screen Shot 2022-02-13 at 7 33 06 PM
DaveLomber commented 2 years ago

I see 'type=3' which is wrong

it should be type="chat" for 1-1 and type="groupchat" for group chats

natalialuzuriaga commented 2 years ago

Thanks for getting back to me!

As advised, I passed in type="chat" when calling ConnectyCube.chat.send(params). The onMessage listener is still not being triggered as shown in the updated logs below:

Screen Shot 2022-02-18 at 1 53 49 AM
DaveLomber commented 2 years ago

Ok then please show 2 code snippets: