Closed stephanoparaskeva closed 3 years ago
If you want to send messages via REST API and to be them delivered in real time, just add one more parameter: send_to_chat: 1
:
data: {
recipient_id: recipient?.cubeId,
message: 'where are you?',
send_to_chat: 1
},
as described here https://developers.connectycube.com/server/chat?id=create-a-message
This has worked, thank you! @DaveLomber
This has worked, thank you! @DaveLomber
ConnectyCube.chat.onMessageListener = () => console.warn('MESSAGE RECEIVED');
i am in doubt, where to add this code inorder to catch the live messages in the chat. I am using function components instead of class. could someone please help, i am stucked!! @DaveLomber @stephanoparaskeva
Success.
console.warn of y:
Other phone:
Never gets called.
Version:
"react-native-connectycube": "^3.7.8",