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
- Create a
TagRequestModel
object, using theTagRequestModelBuilder
class. - For tagging a member in a conversation call
getTaggingList()
function using the instance ofLMChatClient
class, using your request object. - 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
Variable | Type | Description | Nullable |
---|---|---|---|
chatroomId | int? | Chatroom Id | ✔️ |
page | int? | Page number | ✔️ |
pageSize | int? | Page size | ✔️ |
searchQuery | String? | Search string | ✔️ |
TagResponseModel
List of parameters for the TagResponseModel
class
Variable | Type | Description | Nullable |
---|---|---|---|
success | bool | API success status | |
errorMessage | String? | Error message in case of failure | ✔️ |
members | List<UserTag>? | List of member tags | ✔️ |
groupTags | List<dynamic>? | List of group tags | ✔️ |
UserTag
List of parameters used in UserTag
Variable | Type | Description | Optional |
---|---|---|---|
name | String | name of the user | ✔️ |
imageUrl | String | url of the image | ✔️ |
customTitle | String | custom title of the user | ✔️ |
id | int | unique id of the user | ✔️ |
isGuest | bool | is user guest | ✔️ |
userUniqueId | String | unique id of the user | ✔️ |