共用方式為


ChatAdapterThreadManagement interface

管理目前聊天對話的功能。

方法

deleteMessage(string)

刪除線程中的訊息。

downloadResourceToCache(ResourceDetails)

將資源下載到給定消息的緩存中。

fetchInitialData()

擷取聊天配接器的初始狀態。

執行 ChatComposite 和 API 方法所需的最小擷取。

loadPreviousChatMessages(number)

在聊天對話歷程記錄中載入更多先前的訊息。

removeParticipant(string)

拿掉線程中的參與者。

removeResourceFromCache(ResourceDetails)

從給定消息的緩存中刪除資源。

sendMessage(string, SendMessageOptions)

在線程中傳送訊息。 請注意,SendMessageOptions 已被棄用,請改用 MessageOptions。

sendReadReceipt(string)

傳送訊息的讀取回條。

sendTypingIndicator()

在線程中傳送輸入指標。

setTopic(string)

設定線程的主題。

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

更新訊息內容。 請注意,元數據已被棄用,請改用 MessageOptions.metadata。

方法詳細資料

deleteMessage(string)

刪除線程中的訊息。

function deleteMessage(messageId: string): Promise<void>

參數

messageId

string

傳回

Promise<void>

downloadResourceToCache(ResourceDetails)

將資源下載到給定消息的緩存中。

function downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>

參數

resourceDetails
ResourceDetails

傳回

Promise<void>

fetchInitialData()

擷取聊天配接器的初始狀態。

執行 ChatComposite 和 API 方法所需的最小擷取。

function fetchInitialData(): Promise<void>

傳回

Promise<void>

loadPreviousChatMessages(number)

在聊天對話歷程記錄中載入更多先前的訊息。

function loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>

參數

messagesToLoad

number

傳回

Promise<boolean>

備註

此方法通常用來控制累加式擷取/無限捲動

removeParticipant(string)

拿掉線程中的參與者。

function removeParticipant(userId: string): Promise<void>

參數

userId

string

傳回

Promise<void>

removeResourceFromCache(ResourceDetails)

從給定消息的緩存中刪除資源。

function removeResourceFromCache(resourceDetails: ResourceDetails)

參數

resourceDetails
ResourceDetails

sendMessage(string, SendMessageOptions)

在線程中傳送訊息。 請注意,SendMessageOptions 已被棄用,請改用 MessageOptions。

function sendMessage(content: string, options?: SendMessageOptions): Promise<void>

參數

content

string

傳回

Promise<void>

sendReadReceipt(string)

傳送訊息的讀取回條。

function sendReadReceipt(chatMessageId: string): Promise<void>

參數

chatMessageId

string

傳回

Promise<void>

sendTypingIndicator()

在線程中傳送輸入指標。

function sendTypingIndicator(): Promise<void>

傳回

Promise<void>

setTopic(string)

設定線程的主題。

function setTopic(topicName: string): Promise<void>

參數

topicName

string

傳回

Promise<void>

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

更新訊息內容。 請注意,元數據已被棄用,請改用 MessageOptions.metadata。

function updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>

參數

messageId

string

content

string

options

Record<string, string>

傳回

Promise<void>