Browse SDKs · React Native
SDKsReact Native

Mute or unmute a group member

OpenIM React Native SDK guide for mute or unmute a group member.

Copy

Call changeGroupMemberMute() to set a mute duration for a member. Pass 0 to remove the mute.

await OpenIMSDK.changeGroupMemberMute({
  groupID: 'group-001',
  userID: 'user-002',
  mutedSeconds: 3600,
});

Parameters

| Parameter | Type | Required | Description | | --- | --- | --- | | groupID | string | Yes | ID of the target group. | | userID | string | Yes | User ID of the member to mute or unmute. | | mutedSeconds | number | Yes | Mute duration in seconds. Pass 0 to remove the mute. |

When the call completes, the member mute state is updated. Member profile changes trigger OnGroupMemberInfoChanged; read muteEndTime from the event parameter to get the mute end time. See Get group members for event handling.