|
| 1 | +# Ubiquitous Language |
| 2 | + |
| 3 | +## Rooms & Conversations |
| 4 | + |
| 5 | +| Term | Definition | Aliases to avoid | |
| 6 | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | |
| 7 | +| **Room** | A server-side conversation container with shared state (name, type, settings) | Chat, conversation | |
| 8 | +| **Subscription** | A user's personal relationship to a Room, holding per-user state (unread count, favorite, muted, open) | Membership, room entry | |
| 9 | +| **Channel** | A public Room (type `'c'`) visible to all server users | Public room | |
| 10 | +| **Group** | A private Room (type `'p'`) visible only to invited members | Private room, private channel | |
| 11 | +| **Direct Message** | A 1-on-1 private Room (type `'d'`) between two users | DM, PM, private message | |
| 12 | +| **Thread** | A branched conversation spawned from a single Message, identified by `tmid` (thread message id) | Reply chain | |
| 13 | +| **Discussion** | A separate Room spawned from a parent Room, identified by `prid` (parent room id) — unlike Threads, Discussions are full Rooms | Sub-room, sub-channel | |
| 14 | +| **Team** | An organizational container that groups multiple Channels and users under a single entity | Workspace (ambiguous) | |
| 15 | + |
| 16 | +## Messages |
| 17 | + |
| 18 | +| Term | Definition | Aliases to avoid | |
| 19 | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------- | |
| 20 | +| **Message** | A unit of communication within a Room, identified by `_id` with content in `msg` and parsed markdown in `md` | Chat message, text | |
| 21 | +| **Thread Message** | A Message that belongs to a Thread, identified by presence of `tmid` | Reply, thread reply | |
| 22 | +| **System Message** | A Message generated by the server to record events (user joined, room archived, role changed) — identified by `t` (type) field | Event, notification | |
| 23 | +| **Attachment** | Rich media or structured data embedded in a Message (image, video, audio, file, or action buttons) | File, media | |
| 24 | +| **Reaction** | An emoji response to a Message, tracking which usernames reacted | Emoji reaction | |
| 25 | +| **Mention** | An `@username` reference within a Message that triggers notifications | Tag, ping | |
| 26 | +| **Draft Message** | A user's unsent composition stored on a Subscription or Thread (`draftMessage` field) | Unsent message | |
| 27 | +| **Snippet** | A saved excerpt from a Message | — | |
| 28 | + |
| 29 | +## Message Status |
| 30 | + |
| 31 | +| Term | Definition | Aliases to avoid | |
| 32 | +| ----------- | -------------------------------------------------------------------- | ---------------- | |
| 33 | +| **Sent** | Message successfully delivered to server (status `0`) | Delivered | |
| 34 | +| **Temp** | Message created locally but not yet confirmed by server (status `1`) | Pending, sending | |
| 35 | +| **Error** | Message that failed to send (status `2`) | Failed | |
| 36 | +| **Pinned** | Message flagged as important and pinned to the Room by a user | Bookmarked | |
| 37 | +| **Starred** | Message bookmarked by the current user for personal reference | Saved | |
| 38 | + |
| 39 | +## Users & Roles |
| 40 | + |
| 41 | +| Term | Definition | Aliases to avoid | |
| 42 | +| --------------- | ---------------------------------------------------------------------------------- | ----------------------- | |
| 43 | +| **User** | An authenticated identity on the server with username, status, and roles | Account, profile | |
| 44 | +| **Logged User** | The currently authenticated User session, holding auth token and preferences | Current user, session | |
| 45 | +| **Role** | A named permission group assigned to Users (e.g., owner, moderator, leader, guest) | Permission group | |
| 46 | +| **Permission** | A named capability mapped to one or more Roles | Privilege, access right | |
| 47 | +| **Active User** | A User currently tracked as online/away/busy via real-time presence | Online user | |
| 48 | +| **Member** | A User viewed in the context of a specific Room's membership list | Participant | |
| 49 | + |
| 50 | +## User Status |
| 51 | + |
| 52 | +| Term | Definition | Aliases to avoid | |
| 53 | +| ----------- | -------------------------------- | ---------------- | |
| 54 | +| **Online** | User is actively connected | Active | |
| 55 | +| **Away** | User idle past timeout threshold | Idle | |
| 56 | +| **Busy** | User has set do-not-disturb | DND | |
| 57 | +| **Offline** | User is not connected | Disconnected | |
| 58 | + |
| 59 | +## Omnichannel / Livechat |
| 60 | + |
| 61 | +| Term | Definition | Aliases to avoid | |
| 62 | +| ---------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------- | |
| 63 | +| **Omnichannel Room** | A customer-service Room (type `'l'`) connecting a Visitor to an Agent | Livechat room, support chat | |
| 64 | +| **Visitor** | An external customer who initiates an Omnichannel conversation, identified by a unique token | Client, customer, end-user | |
| 65 | +| **Agent** | A User designated to handle Omnichannel conversations, with `statusLivechat` (available/unavailable) | Support agent, operator, rep | |
| 66 | +| **Inquiry** | A queued Omnichannel request waiting to be picked up or routed to an Agent | Queue item, ticket | |
| 67 | +| **Department** | An organizational unit that groups Agents for Omnichannel routing | Team (ambiguous), group | |
| 68 | +| **Omnichannel Source** | How an Omnichannel conversation was initiated (widget, email, sms, app, api) | Channel origin | |
| 69 | +| **Served By** | The Agent currently assigned to handle an Omnichannel Room | Assigned agent, handler | |
| 70 | +| **On Hold** | An Omnichannel Room temporarily paused by the Agent | Paused, suspended | |
| 71 | +| **Transfer** | Moving an Omnichannel Room to a different Agent or Department | Forward, reassign, handoff | |
| 72 | + |
| 73 | +## Encryption |
| 74 | + |
| 75 | +| Term | Definition | Aliases to avoid | |
| 76 | +| ------------------ | ---------------------------------------------------------------------------------------------------------------------- | ---------------- | |
| 77 | +| **E2E Encryption** | End-to-end encryption for Room content using AES-SHA2, with two protocol versions (`rc.v1.aes-sha2`, `rc.v2.aes-sha2`) | Encryption, E2EE | |
| 78 | +| **E2E Key** | A user's asymmetric key pair (public + private) for E2E Encryption | Crypto key | |
| 79 | +| **OTR** | Off-The-Record messaging — ephemeral encrypted conversation mode between two users | — | |
| 80 | + |
| 81 | +## Video & Voice |
| 82 | + |
| 83 | +| Term | Definition | Aliases to avoid | |
| 84 | +| --------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------- | |
| 85 | +| **Video Conference** | A video/voice call session with status lifecycle (calling, started, expired, ended, declined) | Video call, meeting | |
| 86 | +| **Direct Video Conference** | A 1-on-1 Video Conference | — | |
| 87 | +| **Group Video Conference** | A multi-participant Video Conference with title and anonymous user support | — | |
| 88 | +| **VOIP** | Voice-over-IP phone-style call, separate from Video Conference — uses ICE servers and media streams | Phone call, voice call | |
| 89 | + |
| 90 | +## Server & Connection |
| 91 | + |
| 92 | +| Term | Definition | Aliases to avoid | |
| 93 | +| ------------------ | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | |
| 94 | +| **Server** | A Rocket.Chat server instance the app connects to, with version, settings, and enterprise modules | Workspace (used by web but not consistently in mobile), instance | |
| 95 | +| **Server History** | List of previously connected Servers for quick reconnection | Recent servers | |
| 96 | +| **Meteor Connect** | The WebSocket connection to the Server's DDP (Distributed Data Protocol) endpoint | Socket, connection | |
| 97 | + |
| 98 | +## Navigation & Layout |
| 99 | + |
| 100 | +| Term | Definition | Aliases to avoid | |
| 101 | +| -------------------- | ----------------------------------------------------------------------------------------- | ---------------------- | |
| 102 | +| **Outside Stack** | Navigation screens shown when unauthenticated (server selection, login, register) | Auth stack, login flow | |
| 103 | +| **Inside Stack** | Navigation screens shown when authenticated (rooms, settings, profile) | Main stack, app stack | |
| 104 | +| **Master-Detail** | Tablet layout with room list (master pane) and room content (detail pane) side by side | Split view, two-pane | |
| 105 | +| **Chats Stack** | The primary messaging navigation within Inside Stack (room list, room view, room actions) | — | |
| 106 | +| **Drawer Navigator** | Side navigation containing tabs: Chats, Profile, Settings, Admin, Accessibility | Sidebar, menu | |
| 107 | + |
| 108 | +## Unread & Notification Indicators |
| 109 | + |
| 110 | +| Term | Definition | Aliases to avoid | |
| 111 | +| ------------------ | -------------------------------------------------------------------------------------------------------- | ----------------- | |
| 112 | +| **Unread** | Count of unread regular Messages in a Subscription | Badge count | |
| 113 | +| **User Mentions** | Count of Messages that `@mentioned` the current user in a Subscription | Personal mentions | |
| 114 | +| **Group Mentions** | Count of `@all` or `@here` mentions in a Subscription | Channel mentions | |
| 115 | +| **Tunread** | Array of Thread IDs with unread replies | Thread unread | |
| 116 | +| **Alert** | Boolean flag on a Subscription indicating it has unread mentions or special activity requiring attention | Notification flag | |
| 117 | + |
| 118 | +## Relationships |
| 119 | + |
| 120 | +- A **Room** can be of type **Channel**, **Group**, **Direct Message**, or **Omnichannel Room** |
| 121 | +- A **Subscription** belongs to exactly one **Room** and one **User** |
| 122 | +- A **Message** belongs to exactly one **Room** (via `rid`) |
| 123 | +- A **Thread** is spawned from exactly one **Message** and contains one or more **Thread Messages** |
| 124 | +- A **Discussion** creates a new **Room** linked to a parent **Room** (via `prid`) |
| 125 | +- A **Team** has exactly one main **Room** and can contain multiple **Channels** |
| 126 | +- An **Omnichannel Room** connects exactly one **Visitor** with zero or one **Agents** (via **Served By**) |
| 127 | +- An **Agent** belongs to one or more **Departments** |
| 128 | +- An **Inquiry** becomes an **Omnichannel Room** when picked up by an **Agent** |
| 129 | + |
| 130 | +## Example dialogue |
| 131 | + |
| 132 | +> **Dev:** "When a user opens the app, do they see their **Subscriptions** or their **Rooms**?" |
| 133 | +> **Domain expert:** "**Subscriptions**. The sidebar shows the user's Subscriptions — each one points to a Room, but carries user-specific state like **Unread** count and **Alert** flag. A Room exists independently; a Subscription is the user's window into it." |
| 134 | +> **Dev:** "So if someone starts a **Thread** in a **Channel**, does that create a new **Subscription**?" |
| 135 | +> **Domain expert:** "No. A **Thread** lives inside the parent Room's **Subscription**. Thread unreads are tracked via **Tunread** on the Subscription. A **Discussion**, on the other hand, creates an entirely new Room with its own Subscription." |
| 136 | +> **Dev:** "And for **Omnichannel** — when a **Visitor** sends a message from the widget, what happens?" |
| 137 | +> **Domain expert:** "An **Inquiry** is created and queued. Once an **Agent** picks it up or routing assigns it, the Inquiry becomes an **Omnichannel Room** with the Agent recorded in **Served By**. If the Agent needs to escalate, they do a **Transfer** to another Agent or **Department**." |
| 138 | +
|
| 139 | +## Flagged ambiguities |
| 140 | + |
| 141 | +- **"Workspace"** is used by Rocket.Chat web to mean a server instance, but the mobile codebase uses **Server**. Use **Server** in mobile context to avoid confusion with the web admin concept. |
| 142 | +- **"Room type `'e2e'`"** and **"Room type `'thread'`"** appear in `SubscriptionType` enum but are marked with FIXME in code — these are not true room types but flags. Do not treat them as room types in new code. |
| 143 | +- **"Account"** is sometimes used loosely to mean either **User** (the identity) or **Server** (the connected instance). These are distinct: a **User** authenticates on a **Server**. |
| 144 | +- **"Channel"** in everyday speech can mean any Room, but in domain terms it strictly means a public Room (type `'c'`). A private Room is a **Group** (type `'p'`). |
| 145 | +- **"Forward"** in omnichannel context means **Transfer** (reassigning a room to another agent/department). The codebase uses both `forwardRoom` and "transfer" — prefer **Transfer** as the domain term. |
0 commit comments