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

Api About To Get a User Dialog Separately With The User Id #150

Closed krishna11124 closed 3 years ago

krishna11124 commented 3 years ago

Hello Team, This is Krishna I Want To Ask Is There Any Api About For Getting a User Dialog Seperatly With The User Id. Thanks

DaveLomber commented 3 years ago

When you call getDialogs API - it will return chat dialogs only bounded to current user - where current user is in occupants

Could you please specify with more details what's required at your side

Thanks

krishna11124 commented 3 years ago

Hello, Actually I Want this single-user dialog on behalf of the user id?? So is there any API & Method for getting user dialog within user id??

Like this:- {"id":"5fa8d6a8ca8bf41def05a7cc","type":3,"xmpp_room_jid":null,"xmpp_type":"chat","name":"User","photo":"",token="12345","description":null,"user_id":"1111,"admins_ids":[],"occupants_ids":[0,0],"updated_date":1606119965000,"last_message_date_sent":4544,"last_message":"Hello","last_message_id":"4545","last_message_user_id":5454545,"unread_messages_count":16,"pinned_messages_ids":[]}

DaveLomber commented 3 years ago

If you want to get a dialog by id, then you can do the following:

const filters = {_id: "...."};

ConnectyCube.chat.dialog
  .list(filters)
  .then((result) => {})
  .catch((error) => {});
DaveLomber commented 3 years ago

There are more filters available https://developers.connectycube.com/server/chat?id=retrieve-chat-dialogs