Skip to content

Create Conversation



wss conversation_create

The conversation_create request creates a conversation object on the server and notifies all participants about it, if they have been added.

NameTypeDescription
typestringConversation type
namestringConversation name
descriptionstringDescription of conversation
participantsarray[string]Array of participant IDs
opponent_idstringOpponent ID for private chat
image_object.file_blur_hashstringBlur hash for chat image
image_object.file_namestringChat image name
image_object.file_idstringChat image file id
NameTypeDescription
conversationobjectNewly created Conversation object
{
"request": {
"conversation_create": {
"name": "ChantName",
"description": "Description",
"type": "g"
"participants": [ "63077ad836b78c3d82af0812", "63077ad836b78c3d82af0866" ]
},
"id": "RequestId"
}
}
{ "response": { "id": "RequestId", "conversation": { ... } } }

After conversation created, all the online participants will receive the following event about newly created conversation:

{
"system_message": {
"_id": "646e2092d80fe5c4e688dfa0",
"t": 15673838833,
"cid": "646e2092d80fe5c4e688dfa0",
"from": "63077ad836b78c3d82af0812",
"x": {
"conversation_created": {
"_id": "646e2092d80fe5c4e688dfa0",
"type": "u",
"opponent_id": "646c823bf989c57fe910d289",
"participants": ["646c823bf989c57fe910d289"],
"owner_id": "646c82947b3aceab988c0073",
"created_at": "2023-05-24T14:34:58.066Z",
"updated_at": "2023-05-24T14:52:24.953Z"
}
}
}
}