Browse SDKs · React Native
Platform
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

ParameterTypeRequiredDescription
groupIDstringYesID of the target group.
userIDstringYesUser ID of the member to mute or unmute.
mutedSecondsnumberYesMute 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.