getActiveConversations();
Call this method to get active conversations. The active conversations are the active private 1-1 conversation between the user and other users.
JavaScript
const conversations = await sdk.getActiveConversations();
Response Properties
Properties | Description | Type |
---|---|---|
eventId | id of the event | String |
conversations | Array of objects containing conversations | Array |
conversations
Properties | Description | Type |
---|---|---|
_id | id of the conversations | String |
archivedForUsers | Array of users for whom this conversation has been archived | Array |
customer | customerId | String |
chatRoom | chat room id | String |
memberOne | Object of the first member that initiated the conversation | Object |
memberTwo | Object of the second member that received the message | Object |
created | when the conversation was created | String |
member
Properties | Description | Type |
---|---|---|
_id | id of the member | String |
username | username of the member | String |
websocketId | websocketId | String |
JSON Sample Response
{
"eventId": "d6897a6e-ebdc-4387-a767-11670c7e8f8d",
"conversations": [
{
"_id": "63289b4bf0357f1c648791e8",
"archivedForUsers": [],
"customer": "631794a83671700c713b1ce5",
"chatRoom": "631794a83671700c713b1ce6",
"memberOne": {
"_id": "63233015c3aa3508a4c8fc34",
"username": "support",
"webSocketId": "-3iQiUXnwCrkJlVIAAAX"
},
"memberTwo": {
"_id": "63289b35f0357f1c648791e5",
"username": "user 1",
"webSocketId": "h9BX6tPfVtoksSxrAAAa"
},
"created": "2022-09-19T16:39:39.882Z",
"__v": 0
}
]
}