This method has been deprecated and is scheduled for removal in the 8.0.0 release. Use the /rooms.muteUser endpoint instead.
Mute a user in a room.
Method | Requires Auth | Permission |
---|---|---|
| Yes |
|
Payload parameters
Argument | Example | Required | Description |
---|---|---|---|
|
| Required | An object containing the room ID and username of the user to be muted. |
Example call
{
"msg": "method",
"method": "muteUserInRoom",
"id": "2",
"params": [
{
"rid": "siyr2oWQJBjQjhLwr",
"username": "test.fun"
}
]
}
Example response
Success
{
"msg": "result",
"id": "2",
"result": true
}
Errors
User not in the room: This occurs when the
username
doesn't belong to any user in the room.No Permission: This occurs when the authenticated user does not have the
mute-user
permission.
{
"msg": "result",
"id": "2",
"error": {
"isClientSafe": true,
"error": "error-user-not-in-room",
"reason": "User is not in this room",
"details": {
"method": "muteUserInRoom"
},
"message": "User is not in this room [error-user-not-in-room]",
"errorType": "Meteor.Error"
}
}
{
"msg": "result",
"id": "2",
"error": {
"isClientSafe": true,
"error": "error-not-allowed",
"reason": "Not allowed",
"details": {
"method": "muteUserInRoom"
},
"message": "Not allowed [error-not-allowed]",
"errorType": "Meteor.Error"
}
}