getGroupMemberList

Introduction

Load the list of members from the group.

You could get the group member list with this method, it will provide the profile information of the group members.

This method supports both filter and paging, as their maybe numerous members in the group.

filter and nextSeq will not work on Web, while count and offset is required.

The special limit for the AVChatRoom: Do not supports the request for different member types, and the upper limit for the count is 31, new entry members has the priority. User will exist the group after turning off the APP, and should re-enter the group after backing to APP, otherwise a error code of 10007 will be returned.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID.
filter GroupMemberFilterTypeEnum yes All Filtered with the type parameter of the group member.
nextSeq String yes All The sequence number used for requesting in pages, while it is "0" in the first iteration. Indicating needs to request for the next page if the nextSeq not null in callback.
count int no All Not works temporarily.
offset int no All The offset, 0 in default.

Returned template

V2TimValueCallback<V2TimGroupMemberInfoResult>

{
    code : int
    desc : String
    data : {
        memberInfoList : List<V2TimGroupMemberFullInfo?>
        nextSeq : String // The sequence number used for the next request iteration.
    }
}

Return value details

name type description
code int Request result: Error codes. 0 means success.
desc String The description of the error. It will be empty if success.
data List< V2TimGroupMemberFullInfo > The list of members of the group obtained.

Code example

    V2TimValueCallback<V2TimGroupMemberInfoResult> getGroupMemberListRes =
        await TencentImSDKPlugin.v2TIMManager
            .getGroupManager()
            .getGroupMemberList(
                groupID: "groupID",
                filter:GroupMemberFilterTypeEnum.V2TIM_GROUP_MEMBER_FILTER_ADMIN,
                nextSeq: "0",
                count: 100,
                offset:0,
                );
    if (getGroupMemberListRes.code == 0) {
      getGroupMemberListRes.data?.memberInfoList?.forEach((element) {
        element?.customInfo;
        element?.faceUrl;
        element?.friendRemark;
        element?.joinTime;
        element?.muteUntil;
        element?.nameCard;
        element?.nickName;
        element?.role;
        element?.userID;
      });
    }

results matching ""

    No results matching ""