ChatAdapterThreadManagement interface
Functionality for managing the current chat thread.
Methods
delete |
Delete a message in the thread. |
fetch |
Fetch initial state for the Chat adapter. Performs the minimal fetch necessary for ChatComposite and API methods. |
load |
Load more previous messages in the chat thread history. |
remove |
Remove a participant in the thread. |
send |
Send a message in the thread. |
send |
Send a read receipt for a message. |
send |
Send typing indicator in the thread. |
set |
Set the topic for the thread. |
update |
Update a message content. |
Method Details
deleteMessage(string)
Delete a message in the thread.
function deleteMessage(messageId: string): Promise<void>
Parameters
- messageId
-
string
Returns
Promise<void>
fetchInitialData()
Fetch initial state for the Chat adapter.
Performs the minimal fetch necessary for ChatComposite and API methods.
function fetchInitialData(): Promise<void>
Returns
Promise<void>
loadPreviousChatMessages(number)
Load more previous messages in the chat thread history.
function loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>
Parameters
- messagesToLoad
-
number
Returns
Promise<boolean>
Remarks
This method is usually used to control incremental fetch/infinite scroll
removeParticipant(string)
Remove a participant in the thread.
function removeParticipant(userId: string): Promise<void>
Parameters
- userId
-
string
Returns
Promise<void>
sendMessage(string, SendMessageOptions)
Send a message in the thread.
function sendMessage(content: string, options?: SendMessageOptions): Promise<void>
Parameters
- content
-
string
- options
- SendMessageOptions
Returns
Promise<void>
sendReadReceipt(string)
Send a read receipt for a message.
function sendReadReceipt(chatMessageId: string): Promise<void>
Parameters
- chatMessageId
-
string
Returns
Promise<void>
sendTypingIndicator()
Send typing indicator in the thread.
function sendTypingIndicator(): Promise<void>
Returns
Promise<void>
setTopic(string)
Set the topic for the thread.
function setTopic(topicName: string): Promise<void>
Parameters
- topicName
-
string
Returns
Promise<void>
updateMessage(string, string, Record<string, string>)
Update a message content.
function updateMessage(messageId: string, content: string, metadata?: Record<string, string>): Promise<void>
Parameters
- messageId
-
string
- content
-
string
- metadata
-
Record<string, string>
Returns
Promise<void>