tencent cloud

All product documents
Chat
Last updated: 2024-02-07 11:12:10
Unity
Last updated: 2024-02-07 11:12:10

Feature Description

Only locally stored group members can be searched for, such as the list of group members or group member profiles that have been pulled.
Note:
This feature cannot be used for audio-video groups (AVChatRoom) as the group members are not stored locally.

Searching a Local Group

Call the GroupSearchGroupMembers API (Details) to search for a local group member. You can set the search keyword group_search_member_params_keyword_list and specify the search scope to set whether to search by the memberUserID, memberNickName, memberRemark, and memberNameCard fields of a group member.
Depending on whether group_search_member_params_groupid_list of the GroupMemberSearchParam (Details) in GroupSearchGroupMembers is empty (null), there are two cases:
If group_search_member_params_groupid_list is left empty, members in all the groups will be searched for and returned by groupID.
If group_search_member_params_groupid_list is not left empty, members in the specified group will be searched for.
Sample code:
// Search for group members by the keyword and group ID
GroupMemberSearchParam param = new GroupMemberSearchParam
{
group_search_member_params_groupid_list = new List<string>
{
"group_id"
},
group_search_member_params_keyword_list = new List<string>
{
"Keyword 1"
},
group_search_member_params_field_list = new List<TIMGroupMemberSearchFieldKey>
{
TIMGroupMemberSearchFieldKey.kTIMGroupMemberSearchFieldKey_Identifier,
TIMGroupMemberSearchFieldKey.kTIMGroupMemberSearchFieldKey_NikeName,
TIMGroupMemberSearchFieldKey.kTIMGroupMemberSearchFieldKey_Remark,
TIMGroupMemberSearchFieldKey.kTIMGroupMemberSearchFieldKey_NameCard,
}
};
TIMResult res = TencentIMSDK.GroupSearchGroupMembers(param, (int code, string desc, List<GroupGetOnlineMemberCountResult> result, string user_data)=>{
// Process the async logic
});
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon