Skip to content

MessagesResource

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:5

Messages, reactions, read state and typing in one conversation, as the signed-in user.

list(conversationId, options?): Promise<Page<ChatMessage>>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:20

Newest first; deleted messages come back as tombstones (status: 'DELETED', empty body).

string

ListOptions = {}

Promise<Page<ChatMessage>>


send(conversationId, input): Promise<ChatMessage>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:27

Needs messages.send and membership; 422 conversation_archived on an archived conversation.

string

SendMessageInput

Promise<ChatMessage>


edit(conversationId, messageId, body): Promise<ChatMessage>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:32

The author with messages.update, or a moderator with messages.delete.

string

string

string

Promise<ChatMessage>


delete(conversationId, messageId): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:37

Leaves a tombstone. The author with messages.update, or a moderator with messages.delete.

string

string

Promise<void>


addReaction(conversationId, messageId, emoji): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:41

string

string

string

Promise<void>


removeReaction(conversationId, messageId, emoji): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:45

string

string

string

Promise<void>


markRead(conversationId, messageId?): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:50

Marks the conversation read up to messageId (default: its latest message).

string

string

Promise<void>


typing(conversationId): Promise<void>

Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:55

Ephemeral “is typing” signal to the other members; call it at most every few seconds while typing.

string

Promise<void>