Skip to main content

Tag Member in Conversation

You can get the list of all the tags present in the community by calling the getTaggingList() method present in LMChatClient class and passing the request object.

Steps to tag member in a conversation

  1. Create a TagRequestModel object, using the TagRequestModelBuilder class.
  2. For tagging a member in a conversation call getTaggingList() function using the instance of LMChatClient class, using your request object.
  3. Process the response (LMResponse<TagResponseModel>) as per your requirement.
TagRequestModel request = (TagRequestModelBuilder()
..chatroomId(CHATROOM_ID))
.build();

LMResponse<TagResponseModel> response =
await lmClient.getTaggingList(request);

if (response.success) {
debugPrint("Tagging list fetched");
} else {
debugPrint("Failed to fetch tagging list");
}

Models

TagRequestModel

List of parameters for the TagRequestModel class

VariableTypeDescriptionNullable
chatroomIdint?Chatroom Id✔️
pageint?Page number✔️
pageSizeint?Page size✔️
searchQueryString?Search string✔️

TagResponseModel

List of parameters for the TagResponseModel class

VariableTypeDescriptionNullable
successboolAPI success status
errorMessageString?Error message in case of failure✔️
membersList<UserTag>?List of member tags✔️
groupTagsList<dynamic>?List of group tags✔️

UserTag

List of parameters used in UserTag

VariableTypeDescriptionOptional
nameStringname of the user✔️
imageUrlStringurl of the image✔️
customTitleStringcustom title of the user✔️
idintunique id of the user✔️
isGuestboolis user guest✔️
userUniqueIdStringunique id of the user✔️