Add Room Leader

Set a user as room leader.

Payload Parameters

Example Call

{
    "msg": "method",
    "method": "addRoomLeader",
    "id": "2",
    "params": [
        "WDuJLFkjwk6L7LdFC",
        "5fRTXMt7DMJbpPJfh"
    ]
}

Example Response

Success

{
    "msg": "result",
    "id": "2",
    "result": true
}

Errors

  • User not in the room: This occurs when the userId doesn't belong to any user in the room.

  • Invalid User: This occurs when the userId doesn't belong to any user in the workspace.

  • User is already a Leader: This occurs when user is already a leader in that room.

  • No Permission: This occurs when the authenticated user does not have the set-leader permission.

{
    "msg": "result",
    "id": "2",
    "error": {
        "isClientSafe": true,
        "error": "error-user-not-in-room",
        "reason": "User is not in this room",
        "details": {
            "method": "addRoomLeader"
        },
        "message": "User is not in this room [error-user-not-in-room]",
        "errorType": "Meteor.Error"
    }
}

Last updated

Rocket.Chat versions receive support for six months after release.