Unmute User in a Room (Realtime)

Prev Next

This method has been deprecated and is scheduled for removal in the 8.0.0 release. Use the /rooms.unmuteUser endpoint instead.

Unmute a user in a room.

Method

Requires Auth

Permission

unmuteUserInRoom

Yes

mute-user

Payload parameters

Argument

Example

Required

Description

data

{ "rid":"siyr2oWQJBjQjhLwr",

"username": "test.fun"

}

Required

An object containing the room ID and username of the 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.

{
    "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"
    }
}