# Chatroom

A chatroom is the core element of beoble, where users can send chats to each other.&#x20;

So, how does the chatroom work? How are the messages delivered in beoble?

You can refer to the [Communication Delivery Graph (CDG) section](/architecture/communication-delivery-graph-cdg.md) to learn more.

{% content-ref url="/pages/AgJpGqXuDIzPIVPKJ6tY" %}
[Communication Delivery Graph  (CDG)](/architecture/communication-delivery-graph-cdg.md)
{% endcontent-ref %}

## Breakdown of Chatroom

The following is the high level of how data are defined in an `Chatroom` object of beoble. The following list doesn't cover every single field in the `Chatroom` object, but it shows some of the essential fields that might be useful to know.

### 1. Identity Data Section

#### Chatroom ID

* **type**: unique identifier
* **description**: Field `chatroom ID` is a unique identifier object for every chatroom of beoble. (i.e., every chatroom in beoble has a unique chatroom ID)

#### Creator

* **type**: persona object
* **description**: Field `Creator` contains the user information of the chatroom creator.

#### Display Name

* **type**: string
* **description**: Field `Display Name` is a field that chatroom admin users can set for chatroom name display purposes to users.

#### Description

* **type**: string
* **description**: Field `Description` is a field that chatroom admin users can set for information display purposes to users.&#x20;

#### Profile

* **type**: media object
* **description**: Field `Profile` stores the media object (i.e., images, gifs, videos) to be shown in the profile and background images of the chatroom.

### 2. Core Data Section

#### Chats

* **type**: bulk of chat objects
* **description**: Field `Chats` are the encrypted messages that belong to a certain chatroom.

#### Last Chat

* **type**: chat object
* **description**: Field `Last Chat` is a cached chat object pointing to this chatroom's last message.

#### Pinned Chat

* **type**: chat object
* **description**: Field `Pinned Chat` is a cached chat object pointing to this chatroom's pinned message.

#### Read (regarding mark as read)

* **type**: read object
* **description**: Field `Read` contains information about which messages members of the chatroom read.

#### Members

* **type**: bulk of member objects
* **description**: `Member` objects are a combination of `Persona` objects with `Role` objects. Each member contains information about the user in this chatroom, like whether this member is an admin or not and what level of access they have.&#x20;

### 3. Encryption Data Section

#### **Chatroom Public Key**

* **type**: key object
* **description**: Field `Chatroom Public Key` is the public key of the chatroom that is used for end-to-end encryption, where users use it to encrypt messages and send them to the chatroom. You can find out more details about encryption in the [Privacy and Encryption section](/architecture/privacy-and-encryption.md).

### 4. Status Data Section

#### Create Time

* **type**: timestamp
* **description**: Field `Create Time` stores the timestamp of the moment when the chatroom object was created.

#### Update Time

* **type**: timestamp
* **description**: Field `Update Time` stores the timestamp of the moment when the chatroom object was updated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.beoble.io/concepts/chatroom.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
