Skip to main content

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

PropertiesDescriptionType
eventIdid of the eventString
conversationsArray of objects containing conversationsArray

conversations

PropertiesDescriptionType
_idid of the conversationsString
archivedForUsersArray of users for whom this conversation has been archivedArray
customercustomerIdString
chatRoomchat room idString
memberOneObject of the first member that initiated the conversationObject
memberTwoObject of the second member that received the messageObject
createdwhen the conversation was createdString

member

PropertiesDescriptionType
_idid of the memberString
usernameusername of the memberString
websocketIdwebsocketIdString
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
}
]
}