The Room Object
The room object represents any form of communication between two or more users. There are at least two fields on the room object.
_id
: The room / user id (depends on the room type)t
: The room type
Room Types
d
: Direct chatc
: Chatp
: Private chatl
: Livechat
The information that comes with the room object changes according to its type.
Direct chat
A direct chat between two users. In this case the room object only has two fields:
_id
: The room idt
: The room type (in this cased
)
Example:
{
"_id": "room-id",
"t": "d"
}
You’ll need to access the room information using data from Get Subscriptions.
Chat
An open chat room. An chat contains more information about the room as it follows:
_id
: The room idt
: The room type (in this casec
)name
: The room nameu
: The room creator (it may return a null user)topic
: (Optional) The room topicmuted
: (Optional) A collection of muted users by its usernamejitsiTimeout
: (Optional) (?)
Example:
{
"_id": "room-id",
"t": "c",
"name": "room-name",
"u": { "_id": "user-id", "username": "username" },
"topic": "room-topic",
"muted": [ "username" ],
"jitsiTimeout": { "$date": 1480377601 }
}
Private chat
A private chat room. This type of room resembles the open chat room with an addition.
_id
: The room idt
: The room type (in this casep
)name
: The room nameu
: The room creator (it may return a null user)topic
: (Optional) The room topicmuted
: (Optional) A collection of muted users by its usernamejitsiTimeout
: (Optional) (?)ro
: Flags if the room is read-only
Example:
{
"_id": "room-id",
"t": "p",
"name": "room-name",
"u": { "_id": null, "username": null },
"topic": "room-topic",
"ro": false // This room is not read-only
}