muteGroupMember

Introduction

Mute a specific group member from sending messages.

The information of muting stored int the muteUtil field of a group member, unit is seconds.

The callback of OnMemberInfoChangedCallback will be triggered for all members of the group, after a group member been muted.

Only group owner and group administrators can mute group members.

Only group owner can mute group administrators.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID.
userID String yes All The ID of the user needed to be muted.
seconds int yes All The time of muting, unit is seconds.

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 muteGroupMemberRes = await TencentImSDKPlugin.v2TIMManager
        .getGroupManager()
        .muteGroupMember(
          groupID: "groupID",
          userID: "userID",
          seconds: 0
          );
     if (muteGroupMemberRes.code == 0) {
     }

results matching ""

    No results matching ""