app.chat_messages
TableRow level security on
A chat message. Photos, files and voice notes are attachments on the message. Written only through app.send_chat_message; deleting soft deletes and hides it.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.conversations on insert; never accepted from the caller and never changed.References app.organizations.id |
| conversation_id | uuid | No | Conversation the message belongs to.References app.conversations.id |
| author_membership_id | uuid | No | Member who sent it.References app.memberships.id |
| message_kind | app.chat_message_kind | No | Text, Photo, File or Voice. |
| body | text | Yes | Message text; optional for a photo, file or voice note. |
| language | text | Yes | Language the author wrote in (BCP 47), for translation. |
| edited_at | timestamp with time zone | Yes | When the author last edited the text. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| auto_reply | boolean | No | True for the automatic out-of-office reply sent for a member who is away (me.out_of_office.auto_reply), never typed by them. |