ChatAdapterThreadManagement interface
用于管理当前聊天线程的功能。
方法
| delete |
删除线程中的消息。 |
| download |
将资源下载到给定消息的缓存中。 |
| fetch |
提取聊天适配器的初始状态。 执行 ChatComposite 和 API 方法所需的最小提取。 |
| load |
在聊天线程历史记录中加载更多以前的消息。 |
| remove |
删除线程中的参与者。 |
| remove |
从给定消息的缓存中删除资源。 |
| send |
在线程中发送消息。 请注意,SendMessageOptions 已被弃用,请改用 MessageOptions。 |
| send |
发送邮件的已读回执。 |
| send |
在线程中发送键入指示器。 |
| set |
设置线程的主题。 |
| update |
更新消息内容。 请注意,元数据已被弃用,请改用 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
- options
- SendMessageOptions
返回
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>