Links

Unmute User In a Room

Unmute a user in a room.
Name
Requires Auth
Permission
Setting
unmuteUserInRoom
Yes
mute-user

Payload Parameters

Argument
Example
Required
Description
data
{
"rid": "siyr2oWQJBjQjhLwr",
"username": "test.funke"
}
Required
An object containing the room id and username of user to be unmuted.

Example Call

{
"msg": "method",
"method": "unmuteUserInRoom",
"id": "2",
"params": [
{
"rid": "siyr2oWQJBjQjhLwr",
"username": "test.funke"
}
]
}

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.
  • Invalid Room: This occurs when the rid is not a valid room id in the workspace.
User not in the room
No Permission
Invalid Room
{
"msg": "result",
"id": "2",
"error": {
"isClientSafe": true,
"error": "error-user-not-in-room",
"reason": "User is not in this room",
"details": {
"method": "unmuteUserInRoom"
},
"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": "unmuteUserInRoom"
},
"message": "Not allowed [error-not-allowed]",
"errorType": "Meteor.Error"
}
}
{
"msg": "result",
"id": "2",
"error": {
"isClientSafe": true,
"error": "error-invalid-room",
"reason": "Invalid room",
"details": {
"method": "unmuteUserInRoom"
},
"message": "Invalid room [error-invalid-room]",
"errorType": "Meteor.Error"
}
}
Last modified 5mo ago
Rocket.Chat versions receive support for six months after release.