Rooms
- 21 Articles
Get all rooms a user belongs to. Payload parameters Example call {
"msg": "method",
"method": "rooms/get",
"id": "42",
"params": [ { "$date": 1480377601 } ]
} Example response The result is an object with two fields: up...
Get room details by room ID. Payload parameters Example call {
"msg": "method",
"method": "getRoomById",
"id": "2",
"params":[
"siyr2oWQJBjQjhLwr"
]
} Example response {
"msg": "result",
"id"...
Get room name by room ID. Payload parameters Example call {
"msg": "method",
"method": "getRoomNameById",
"id": "2",
"params":[
"siyr2oWQJBjQjhLwr"
]
} Example response {
"msg": "result",
"id": "2"...
When a room is archived, it is designated as read-only and removed from the channel list on the left sidebar. Payload parameters Example call {
"msg": "method",
"method": "archiveRoom",
"id": "3",
"params": [
"64a...
Unarchiving a room reverses its read-only status and returns it to the channel list on the left sidebar. Payload parameters Example call {
"msg": "method",
"method": "unarchiveRoom",
"id": "5",
"params": [
"64a1f5...
Mark or unmark a room as favorite. Payload parameters Example call {
"msg": "method",
"method": "toggleFavorite",
"id": "16",
"params": [
"64a1f540376181965ab77f5b",
false
]
} Example response {
...
When a room is hidden, it no longer appears in the channel list, and the "open" property is set to false in the user's subscription for that room. Payload parameters Example call {
"msg": "method",
"method": "hideRoom",
"id...
When a room is opened, it becomes visible in the channel list on the sidebar, and the "open" property in the user's subscription for that room is set to true . Payload parameters Example call {
"msg": "method",
"method": "openRo...
You can leave any room except for direct messages, and you cannot leave rooms where you are the last owner. Payload parameters Example call {
"msg": "method",
"method": "leaveRoom",
"id": "11",
"params": [
"64a1f5...
Create a direct message . Payload parameters Example call {
"msg": "method",
"method": "createDirectMessage",
"id": "472",
"params": ["testrc"]
} Example response {
"msg": "result",
"id": "472",
"result":...
Create a private group . Payload parameters Example call {
"msg": "method",
"method": "createPrivateGroup",
"id": "44728",
"params": [
"testrc7",
["test.queue"],
true
]
} Example response {
"msg": "result",
...
Notify a room about some specific events. Events Typing user-activity Example call {
"msg": "method",
"method": "stream-notify-room",
"id": "42",
"params": [
... // params varies
]
} Typing You can notify a...
Load room history. After the initial load, you can stream room messages . Payload Parameters Example call Request of the latest 50 messages: {
"msg": "method",
"method": "loadHistory",
"id": "42",
"params": [ "64e37db1fed...
Set a user as room leader. Payload parameters Example call {
"msg": "method",
"method": "addRoomLeader",
"id": "2",
"params": [
"WDuJLFkjwk6L7LdFC",
"5fRTXMt7DMJbpPJfh"
]
} Example response Succe...
Set a user as room moderator. Payload parameters Example call {
"msg": "method",
"method": "addRoomModerator",
"id": "2",
"params": [
"64adb09baa5ad4273bfc0cbf",
"rbAXPnMktTFbNpwtJ"
]
} Example resp...
Set a user as room owner. Payload parameters Example call {
"msg": "method",
"method": "addRoomOwner",
"id": "2",
"params": [
"siyr2oWQJBjQjhLwr",
"5fRTXMt7DMJbpPJfh"
]
} Example response Success {...
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. Payload parameters Example call {
"msg": "method",
"method": "muteUserInRo...
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. Payload parameters Example call {
"msg": "method",
"method": "unmuteUs...
Add a user to a room. Payload parameters Example call {
"msg": "method",
"method": "addUserToRoom",
"id": "2",
"params": [
{
"rid":"64f0f82c2c26843a68c1f7ba",
"username":"rodriq"
}
]
} Example res...
Payload parameters Available settings Example call {
"msg": "method",
"method": "saveRoomSettings",
"id": "1639",
"params": [
"64a1f373376181965ab77f54",
"systemMessages",
"false"
]
} Ex...
Get a collection of users and their roles per room. You can send a collection of room IDs (at least one). The user roles per room object is defined as: rid : The room ID this user and role belong to. u : A simple user object with the user I...