ChatAdapterThreadManagement interface

Functionality for managing the current chat thread.

Methods

deleteMessage(string)

Delete a message in the thread.

fetchInitialData()

Fetch initial state for the Chat adapter.

Performs the minimal fetch necessary for ChatComposite and API methods.

loadPreviousChatMessages(number)

Load more previous messages in the chat thread history.

removeParticipant(string)

Remove a participant in the thread.

sendMessage(string, SendMessageOptions)

Send a message in the thread.

sendReadReceipt(string)

Send a read receipt for a message.

sendTypingIndicator()

Send typing indicator in the thread.

setTopic(string)

Set the topic for the thread.

updateMessage(string, string, Record<string, string>)

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

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>