Set Topic Chatroom
With LikeMinds Flutter Chat SDK, you have the ability to set a topic for a chatroom. This feature allows you to categorize and organize discussions, making it easier for participants to understand the purpose or theme of the chatroom.
Steps to Set a Chatroom Topic
- Create an object of the
SetChatroomTopicRequest
class. - Call the
setChatroomTopic()
function using the instance of theLMChatClient
class. - Process the response LMResponse<void> as per your requirement.
SetChatroomTopicRequest request = (SetChatroomTopicRequestBuilder()
..chatroomId(ENTER_CHATROOM_ID)
..conversationId(ENTER_CONVERSATION_ID))
.build();
LMResponse<void> response = await lmChatClient.setChatroomTopic(request);
if (response.success) {
// your function to handle successful topic setting
handleSetTopicSuccess();
} else {
// your function to handle error in setting topic
handleSetTopicError(response.errorMessage);
}
Models
SetChatroomTopicRequest
List of parameters for the SetChatroomTopicRequest
class
Variable | Type | Description | Optional |
---|---|---|---|
chatroomId | int | Unique ID of the chatroom | |
conversationId | int | Unique ID of the conversation |