Skip to content

ConversationPageModel

ConversationPageModel = object

Defined in: packages/schema/src/model.ts:1906

A record page that is the record’s conversation (.record({ conversation })): a header, the messages that point at the record, and a box that sends one. Its message fields name fields of resource; subtitle and members name fields of the record.

optional attachments?: AttachmentsModel

Defined in: packages/schema/src/model.ts:1944

Files a message carries, kept in a resource of their own: picked, pasted or dropped in the box and shown under the message.


optional call?: string

Defined in: packages/schema/src/model.ts:1950

The record’s call, by the name of the API function that admits people to it with calls.join: the header shows Start call, or the call going on with Join, and the page that joins it (?call=join) shows the call beside the messages. The page opens the function’s socket with the record’s key as key, /api/functions/<call>?key=<key>.


optional delete?: boolean | { unless: string; }

Defined in: packages/schema/src/model.ts:1935

Anyone the resource’s delete access allows deletes a message, after confirming: true, or { unless }, a condition on the message’s own fields that keeps it, such as reply_count > 0.

boolean


{ unless: string; }

unless: string

A condition on the message’s own fields that keeps it from being deleted, such as reply_count > 0.


optional edit?: boolean

Defined in: packages/schema/src/model.ts:1930

The author changes their message’s text and mentions in place, as the resource’s update access allows.


optional edited?: string

Defined in: packages/schema/src/model.ts:1918

When the message was last changed, a date or timestamp field, empty for one never changed: a changed one says “(edited)”.


optional empty?: string

Defined in: packages/schema/src/model.ts:1954

What the conversation says while it has no messages.


field: string

Defined in: packages/schema/src/model.ts:1910

The filterable relation of resource that holds this record’s key, which each message sent gets too.


optional members?: string

Defined in: packages/schema/src/model.ts:1924

A JSON field of the record holding user ids: the header names the people other than the reader, with their status, in place of the title.


optional mentions?: string

Defined in: packages/schema/src/model.ts:1920

The user ids a message mentions, a JSON field: @ in the box lists the organization’s members, and each pick lands here.


optional placeholder?: string

Defined in: packages/schema/src/model.ts:1952

The hint in the empty box.


optional reactions?: ReactionsModel

Defined in: packages/schema/src/model.ts:1928

Emoji reactions under each message, kept in a resource of their own.


optional readPosition?: ReadPositionModel

Defined in: packages/schema/src/model.ts:1926

Where each reader’s read position in the record is kept: the conversation opens on a “New messages” line and moves it as they read to the end.


resource: string

Defined in: packages/schema/src/model.ts:1908

The message resource.


sender: string

Defined in: packages/schema/src/model.ts:1912

Who wrote each message: a relation, named as the record it points at, or a text field of user ids, named after the organization’s members.


optional subtitle?: string

Defined in: packages/schema/src/model.ts:1922

A text field of the record shown beside its title in the header, such as a channel’s topic.


text: string

Defined in: packages/schema/src/model.ts:1916

The message itself: a text field.


optional thread?: ConversationThreadModel

Defined in: packages/schema/src/model.ts:1942

Replies in a thread under a message, shown in a panel beside the conversation rather than in it.


time: string

Defined in: packages/schema/src/model.ts:1914

When each message was sent: a date or timestamp field the API can sort by.


optional typing?: true

Defined in: packages/schema/src/model.ts:1959

Says who else types, above the box, and tells the others while the reader types: typing events on the record’s channel of the app’s realtime relay, which declares them.