ConnectyCube / connectycube-reactnative-samples

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

Dialog and message creation with custom parameters, React Native #70

Closed rintsyman closed 4 years ago

rintsyman commented 4 years ago

Hi, I would like to create a dialog and message box with another custom parameter, I downloaded the react native project source code, I created an object and use the class_name, but the data is not saved in the Custom fiel. Here is the creation dialog parameter const params = { type: DIALOG_TYPE.PRIVATE, occupants_ids: userId, data: { class_name: 'user_url', url1: urlProfil, }, };

ccvlad commented 4 years ago

This is a the dialog model. There is not possibility to set custom fields. As workaround you are able to set a custom object in description field in JSON format.

A message model can contains custom fields

rintsyman commented 4 years ago

Dialog type 3 does not support the description

rintsyman commented 4 years ago

So we can't create a custom subject on the message? I have created but I can't insert the data, please help me, I have already spent 3 days on this problem.

ccvlad commented 4 years ago

@rintsyman My apologise, I've confused you and wasted your time! Did you saw this guide?

rintsyman commented 4 years ago

I've already read the guide many times, and I followed it, I created a custom object for the dialog, but when I created the dialog box, everything works but I can't find my data on the custom object list, Isn't it normal ? Won't it create a bug if there's a lot of dialog boxes? I'm gonna send you a screen grab

Le ven. 8 mai 2020 à 12:17, ccvlad notifications@github.com a écrit :

@rintsyman https://github.com/rintsyman My apologise, I've confused you and wasted your time! Did you saw this guide https://developers.connectycube.com/server/chat?id=custom-parameters?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConnectyCube/connectycube-reactnative-samples/issues/70#issuecomment-625723783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIA3QL3HOUPNDDS767RSQLRQPEYXANCNFSM4MXX7LJQ .

ccvlad commented 4 years ago

Did your create a schema for custom data? https://developers.connectycube.com/server/custom_objects?id=create-data-schema

rintsyman commented 4 years ago

Hi, thanks for your help on my ConnectyCube chat project and sorry for the inconvenience but my client found a small bug on the use of the chat. The force that we use a single device to connect with 2 different accounts, after disconnection of the user I connect to another user, the first user is still on the device and the user number can't send a message. I have tested on your POC react native example, but this error is very present, can you help me to solve this problem? we used react native , a track I found , after I logged out and logged in with another user , I have a status ([Chat] CONNECTED - You are already connected) , but when I Killed my application , everything works fine , I'll send you a screenshot Yours sincerely

José Rakotonirina

Le mar. 12 mai 2020 à 15:14, ccvlad notifications@github.com a écrit :

Did your create a schema for custom data?

https://developers.connectycube.com/server/custom_objects?id=create-data-schema

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ConnectyCube/connectycube-reactnative-samples/issues/70#issuecomment-627304940, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIA3QO236RBJMBGIUMCK4DRRE4TVANCNFSM4MXX7LJQ .

ccvlad commented 4 years ago

You have forgotten to call ConnectyCube.chat.disconnect() before new connection. ConnectyCube.chat.connect() in CONNECTED state warns you about it