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 OnMemberInfoChanged 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 | Description |
---|---|---|---|
groupID | string | yes | The group ID. |
userID | string | yes | The ID of the user needed to be muted. |
seconds | number | yes | The time of muting, unit is seconds. |
Returned template
V2TimCallback
{
code : number
desc : string
}
Return value details
name | type | description |
---|---|---|
code | number | Request result: Error codes. 0 means success. |
desc | string | The description of the error. It will be empty if success. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const muteGroupMemberRes = await TencentImSDKPlugin.v2TIMManager
.getGroupManager()
.muteGroupMember(
'groupID',
'userID',
0
);
if (muteGroupMemberRes.code === 0) {
}