transferGroupOwner

Introduction

Transfer the group owner to another member.

The group owner can call transferGroupOwner to transfer the ownership of group to other group members.

After the group ownership is transferred, all group members receive the OnGroupInfoChangedCallback, where the type of V2TIMGroupChangeInfo is GroupChangeInfoType.V2TIM_GROUP_INFO_CHANGE_TYPE_OWNER and the value is the UserID of the new group owner.

Only the group owner can transfer ownership to other members for Work/Public/Meeting groups.

Do not works for AVChatRoom.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID.
userID String yes All The user ID of the new group owner.

Returned template

V2TimCallback

{
    code : int
    desc : String
}

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.

Code example

    V2TimCallback transferGroupOwnerRes = await TencentImSDKPlugin.v2TIMManager
        .getGroupManager()
        .transferGroupOwner(
          groupID: "groupID",
          userID: "userID",
          );
    if (transferGroupOwnerRes.code == 0) {
    }

results matching ""

    No results matching ""