Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app x

Mute or unmute a group

Enable or disable group-wide mute to restrict regular members from sending messages.

Copy

Invoke changeGroupMute() as a group owner or administrator to enable or disable group-wide mute.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group identifier.
isMutebooleanYesSet to true to mute all regular members; set to false to lift the mute.

Setting isMute to true mutes regular members; the owner and administrators typically retain speaking permissions based on server rules. This method accepts only groupID and isMute, and does not support an exception list.

Code example

import { changeGroupMute } from '@/uni_modules/unix-openim-sdk'

await changeGroupMute({
  groupID,
  isMute: true,
})

Return value

The Promise resolves with void once OpenIMServer updates the group mute setting.

State changes after the call

A resolved Promise confirms that the request completed on the server. Update the local group's mute state optimistically, then confirm final state when onGroupInfoChanged arrives matching groupID. To calibrate state, invoke Get specified group profiles. For complete group event listener registration, see Group overview.