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.
Methods
Section titled “Methods”list()
Section titled “list()”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).
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
options?
Section titled “options?”ListOptions = {}
Returns
Section titled “Returns”Promise<Page<ChatMessage>>
send()
Section titled “send()”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.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<ChatMessage>
edit()
Section titled “edit()”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.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
messageId
Section titled “messageId”string
string
Returns
Section titled “Returns”Promise<ChatMessage>
delete()
Section titled “delete()”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.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
messageId
Section titled “messageId”string
Returns
Section titled “Returns”Promise<void>
addReaction()
Section titled “addReaction()”addReaction(
conversationId,messageId,emoji):Promise<void>
Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:41
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
messageId
Section titled “messageId”string
string
Returns
Section titled “Returns”Promise<void>
removeReaction()
Section titled “removeReaction()”removeReaction(
conversationId,messageId,emoji):Promise<void>
Defined in: libs/ccs-chat-user-client/src/resources/messages.resource.ts:45
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
messageId
Section titled “messageId”string
string
Returns
Section titled “Returns”Promise<void>
markRead()
Section titled “markRead()”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).
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
messageId?
Section titled “messageId?”string
Returns
Section titled “Returns”Promise<void>
typing()
Section titled “typing()”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.
Parameters
Section titled “Parameters”conversationId
Section titled “conversationId”string
Returns
Section titled “Returns”Promise<void>