Mute a list of channel users

When a user is muted, they can not send messages in a channel.

Muting and Unmuting

Moderators can mute and unmute users. When a user is muted, they cannot send messages in a channel. However muted users will still be allowed to observe messages in a channel. The status of being muted is indefinite but is only applied at the channel level.

Mute Users

When a user is muted, all messages sent by that user to that channel will be rejected. This method is useful for preventing certain users from sending inappropriate messages, but still allowing them to participate in the conversation in a read-only manner. The timeout property allows you to make the timeout temporary, or permanent by until unset by passing in -1.

// mute user with id `user1` for 10 minutes
repository.muteUsers(["user1"], mutePeriod: 600) { (success, error) in
  ...
}

If you want to permanently mute a user, pass in -1 as the mutePeriod. The user will stay muted until you explicitly unmute that user.

To unmute an user, call unmuteUsers::

repository.unmuteUsers(["user1"]) { (success, error) in
  ...
}

Last updated