Skip to main content

Post Conversation

LikeMinds React Chat SDK allows you to conveniently post a conversation in an existing chatroom by specifying the chatroom ID. This powerful feature enables you to contribute to ongoing discussions, share important information, or engage with other participants in real-time.

Steps to Post a Conversation

  1. To post a conversation, use the postConversation() method provided by the client.
  2. Pass in the required parameter.
  3. Process the response as per your requirement.
const payload: any = {
text: "", // The text string representing your message
chatroomId: 89899, // Your chatroom id
hasFiles: false, // true if the conversation inclued attachments
};
const response = await lmChatClient.postConversation(payload);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Post Conversation Payload

List of parameters provided by postConversation()

VariableTypeDescriptionOptional
chatroomIdnumberChatroom Id
textstringText to be posted
hasFilesbooleanWhether the conversation has files
attachmentCountnumberNumber of attachments in the conversation✔️

Post Conversation Response

List of parameters in the response.

VariableTypeDescription
successbooleanAPI success status
error_messageStringError message in case of failure
conversationObjectConversation object