Room
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 chat
  • c: Chat
  • p: Private chat
  • l: 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 id
  • t: The room type (in this case d)
Example:
1
{
2
"_id": "room-id",
3
"t": "d"
4
}
Copied!
You'll need to access the room information using data from Get Subscriptions.

Chat

An open chatroom. A chat contains more information about the room as it follows:
  • _id: The room id
  • t: The room type (in this case c)
  • name: The room name
  • u: The room creator (it may return a null user)
  • topic: (Optional) The room topic
  • muted: (Optional) A collection of muted users by its username
  • jitsiTimeout: (Optional) (?)
Example:
1
{
2
"_id": "room-id",
3
"t": "c",
4
"name": "room-name",
5
"u": { "_id": "user-id", "username": "username" },
6
"topic": "room-topic",
7
"muted": [ "username" ],
8
"jitsiTimeout": { "$date": 1480377601 }
9
}
Copied!

Private chat

A private chatroom. This type of room resembles the open chat room with an addition.
  • _id: The room id
  • t: The room type (in this case p)
  • name: The room name
  • u: The room creator (it may return a null user)
  • topic: (Optional) The room topic
  • muted: (Optional) A collection of muted users by its username
  • jitsiTimeout: (Optional) (?)
  • ro: Flags if the room is read-only
Example:
1
{
2
"_id": "room-id",
3
"t": "p",
4
"name": "room-name",
5
"u": { "_id": null, "username": null },
6
"topic": "room-topic",
7
"ro": false // This room is not read-only
8
}
Copied!
Last modified 8mo ago
Export as PDF
Copy link
Edit on GitHub