/ SDKs / Unity
SDKs
Chat SDKs Unity v4
Chat SDKs Unity
Chat SDKs
Unity
Version 4

Mute and unmute a user

Copy link

Operators of an open or group channel can restrict selected users from sending messages to the channel using the mute feature. A muted user remains in the channel and is allowed to view the messages but they can't send any messages to the channel until the operators unmute them. Operators can mute and unmute users using the following code.

channel.MuteUser(inUserId: "USER_ID", inSeconds: 1000, inDescription: "description", inError =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});

channel.UnmuteUser(inUserId: "USER_ID", inError =>
{
    if (inError != null)
    {
        return; // Handle error.
    }
});