SDKsiOS
Mute or unmute the entire group
Enable or disable group-wide mute with OpenIM iOS SDK.
Invoke changeGroupMute:isMute:onSuccess:onFailure: to enable or disable group-wide muting (typically restricted to group owners and administrators):
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | NSString * | Yes | Target group ID. |
isMute | BOOL | Yes | Pass YES to enable group-wide mute, or NO to disable. |
Code example
[[OIMManager manager] changeGroupMute:groupID
isMute:YES
onSuccess:^(NSString * _Nullable data) {
NSLog(@"changeGroupMute success");
}
onFailure:^(NSInteger code, NSString *message) {
NSLog(@"changeGroupMute failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback returns confirmation when the server accepts the group mute status change.
State changes after the call
- Local state update: The client updates the local cached group's
statusor mute attribute matchinggroupID. Regular members are prohibited from sending messages, while the group owner and administrators remain unaffected. - Event notification: All members in the group receive an updated
OIMGroupInfoobject via theonGroupInfoChanged:listener callback. - Re-query calibration: To mute an individual member for a specified duration, refer to Mute or unmute a group member. For listener setup, refer to Groups overview.
Was this page helpful?