ChatAdapterThreadManagement interface
Functionality for managing the current chat thread.
Methods
| delete |
Delete a message in the thread. |
| download |
Downloads a resource into the cache for the given message. |
| 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. |
| remove |
Removes a resource from the cache for the given message. |
| send |
Send a message in the thread. Please note that SendMessageOptions is being deprecated, please use MessageOptions instead. |
| 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. Please note that metadata is being deprecated, please use MessageOptions.metadata instead. |
Method Details
deleteMessage(string)
Delete a message in the thread.
function deleteMessage(messageId: string): Promise<void>
Parameters
- messageId
-
string
Returns
Promise<void>
downloadResourceToCache(ResourceDetails)
Downloads a resource into the cache for the given message.
function downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>
Parameters
- resourceDetails
- ResourceDetails
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>
removeResourceFromCache(ResourceDetails)
Removes a resource from the cache for the given message.
function removeResourceFromCache(resourceDetails: ResourceDetails)
Parameters
- resourceDetails
- ResourceDetails
sendMessage(string, SendMessageOptions)
Send a message in the thread. Please note that SendMessageOptions is being deprecated, please use MessageOptions instead.
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. Please note that metadata is being deprecated, please use MessageOptions.metadata instead.
function updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>
Parameters
- messageId
-
string
- content
-
string
- options
-
Record<string, string>
Returns
Promise<void>