Skip to main content

Get Conversations

Simplify your chat application development with LikeMinds React Native Chat SDK. Enhance user conversations, enable real-time messaging, and provide seamless communication experiences with minimal coding effort. By utilizing this feature you can view all the conversations in the chatroom.

Steps to fetch Conversations inside a Chatroom

  1. Call getConversations() function using the instance of lmChatClient.
  2. Process the response as per your requirement.
const getConversationsRequest = GetConversationsRequestBuilder.builder()
.setChatroomId("ENTER_CHATROOM_ID")
.setLimit("ENTER_PAGE_SIZE")
.build();
const repsonse = lmChatClient?.getConversations(getConversationsRequest);

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

GetConversationsRequest

VariableTypeDescriptionOptional
chatroomIdstringID of the chatroom
limitnumberMaximum number of conversations to fetch
medianConversationConversationMedian conversation for pagination✔️
typeGetConversationsTypeEnum containing type of conversation to retrieve✔️

GetConversationsType

Enum ValueDescription
ALLFetches all conversations
ABOVEFetches conversations above the median conversation
BELOWFetches conversations below the median conversation