Protected
Optional
_eventStatic
TAGAdds a message listener.
The message listener to add.
Adds a Reaction.
The Reaction content.
The ID of the message for which the Reaction is added.
A description of the exception. See ChatError.
Marks conversations.
This method marks conversations both locally and on the server.
The list of conversation IDs.
The mark to add for the conversations. See ChatConversationMarkType.
A description of the exception. See ChatError.
Creates a message thread.
Each member of the group where the thread belongs can call this method.
Upon the creation of a message thread, the following will occur:
In a single-device login scenario, each member of the group to which the message thread belongs will receive the ChatMessageEventListener.onChatMessageThreadCreated callback. You can listen for message thread events by setting ChatMessageEventListener.
In a multi-device login scenario, the devices will receive the ChatMultiDeviceEventListener.onThreadEvent callback. You can listen for message thread events by setting ChatMultiDeviceEventListener.
The name of the new message thread. It can contain a maximum of 64 characters.
The ID of the parent message.
The parent ID, which is the group ID.
If success, the new message thread object is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Clears all conversations and all messages in them.
Whether to clear all conversations and all messages in them on the server.
true
:Yes. All conversations and all messages in them will be cleared on the server side.
The current user cannot retrieve messages and conversations from the server, while this has no impact on other users.false
:No. All local conversations and all messages in them will be cleared, while those on the server remain.A description of the exception. See ChatError.
Deletes a conversation and its local messages from the local database.
The conversation ID.
Whether to delete the historical messages with the conversation.
true
: Yes.false
: No.Whether the conversation is successfully deleted.
true
: Yes.false
: No.A description of the exception. See ChatError.
Deletes all messages in the conversation from both the memory and local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Deletes a message from the local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The ID of the message to delete.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Deletes local messages with timestamp that is before the specified one.
The specified Unix timestamp(milliseconds).
A description of the exception. See ChatError.
Deletes messages sent or received in a certain period from the local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
params
A description of the exception. See ChatError.
Unmarks conversations.
This method unmarks conversations both locally and on the server.
The list of conversation IDs.
The conversation mark to remove. See ChatConversationMarkType.
A description of the exception. See ChatError.
Destroys the message thread.
Only the owner or admins of the group where the message thread belongs can call this method.
Note
In a single-device login scenario, each member of the group to which the message thread belongs will receive the ChatMessageEventListener.onChatMessageThreadDestroyed callback. You can listen for message thread events by setting ChatMessageEventListener.
In a multi-device login scenario, the devices will receive the ChatMultiDeviceEventListener.onThreadEvent callback. You can listen for message thread events by setting ChatMultiDeviceEventListener.
The message thread ID.
A description of the exception. See ChatError.
Downloads the message attachment.
You can also call this method if the attachment fails to be downloaded automatically.
The ID of the message with the attachment to be downloaded.
Optional
callback: ChatMessageStatusCallbackThe listener that listens for message changes.
A description of the exception. See ChatError.
Downloads the message attachment.
Note This method is only used to download messages attachment in combine type message or thread type.
Note The bottom layer will not get the original message object and will use the json converted message object.
You can also call this method if the attachment fails to be downloaded automatically.
The ID of the message with the attachment to be downloaded.
Optional
callback: ChatMessageStatusCallbackThe listener that listens for message changes.
A description of the exception. See ChatError.
Downloads the message thumbnail.
The ID of the message with the thumbnail to be downloaded. Only the image messages and video messages have a thumbnail.
Optional
callback: ChatMessageStatusCallbackA description of the exception. See ChatError.
Downloads the message thumbnail.
Note This method is only used to download messages thumbnail in combine type message.
The ID of the message with the thumbnail to be downloaded. Only the image messages and video messages have a thumbnail.
Optional
callback: ChatMessageStatusCallbackA description of the exception. See ChatError.
The conversation list of the current user.
2023-07-24
Gets the conversation list from the server.
Note
A description of the exception. See ChatError.
Gets the details of the message thread from the server.
The message thread ID.
If success, the details of the message thread are returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Uses the pagination to get the list of message threads in the specified group.
This method gets data from the server.
The parent ID, which is the group ID.
The position from which to start getting data. At the first method call, if you set cursor
to null
or an empty string, the SDK will get data in the reverse chronological order of when message threads are created.
The number of message threads that you expect to get on each page. The value range is [1,400].
If success, a list of message threads is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Gets the list of original messages included in a combined message.
A combined message contains one or more multiple original messages.
The combined message.
The list of original messages in the message body.
A description of the exception. See ChatError.
Gets the conversations from the server by conversation filter options.
The conversation filter options. See ChatConversationFetchOptions.
The retrieved list of conversations. See ChatCursorResult.
Gets the list of conversations from the server with pagination.
The SDK retrieves the list of conversations in the reverse chronological order of their active time (generally the timestamp of the last message).
If there is no message in the conversation, the SDK retrieves the list of conversations in the reverse chronological order of their creation time.
Optional
cursor: stringOptional
pageSize: numberThe list of retrieved conversations.
A description of the exception. See ChatError.
Gets conversations from the server with pagination.
The number of conversations to retrieve on each page.
The current page number, starting from 1.
If success, the list of conversations is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Uses the pagination to get read receipts for group messages from the server.
For how to send read receipts for group messages, see sendConversationReadAck.
The message ID.
The starting read receipt ID for query. After this parameter is set, the SDK retrieves read receipts, from the specified one, in the reverse chronological order of when the server receives them.
If this parameter is set as null
or an empty string, the SDK retrieves read receipts, from the latest one, in the reverse chronological order of when the server receives them.
The number of read receipts for the group message that you expect to get on each page. The value range is [1,400].
The list of retrieved read receipts (excluding the one with the starting ID) and the cursor for the next query.
A description of the exception. See ChatError.
Uses the pagination to get messages in the specified conversation from the server.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Optional
direction?: ChatSearchDirectionOptional
pageOptional
startThe list of retrieved messages (excluding the one with the starting ID) and the cursor for the next query.
params
ChatSearchDirection.Up
: Messages are retrieved in the descending order of the Unix timestamp included in them.
- ChatSearchDirection.Down
: Messages are retrieved in the ascending order of the Unix timestamp included in them.A description of the exception. See ChatError.
retrieve the history message for the specified session from the server.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Optional
params: { options: The parameter configuration class for pulling historical messages from the server. See ChatFetchMessageOptions.
Optional
cursor?: stringOptional
options?: ChatFetchMessageOptionsOptional
pageThe list of retrieved messages (excluding the one with the starting ID) and the cursor for the next query.
A description of the exception. See ChatError.
Uses the pagination to get the list of message threads that the current user has joined.
The position from which to start getting data. At the first method call, if you set cursor
to null
or an empty string, the SDK will get data in the reverse chronological order of when the user joins the message threads.
The number of message threads that you expect to get on each page. The value range is [1,400].
If success, a list of message threads is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Uses the pagination to get the list of message threads that the current user has joined in the specified group.
This method gets data from the server.
The parent ID, which is the group ID.
The position from which to start getting data. At the first method call, if you set cursor
to null
or an empty string, the SDK will get data in the reverse chronological order of when the user joins the message threads.
The number of message threads that you expect to get on each page. The value range is [1,400].
If success, a list of message threads is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Gets the last reply in the specified message threads from the server.
The list of message thread IDs to query. You can pass a maximum of 20 message thread IDs each time.
If success, a list of last replies are returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Uses the pagination to get a list of members in the message thread.
Each member of the group to which the message thread belongs can call this method.
The message thread ID.
The position from which to start getting data. At the first method call, if you set cursor
to null
or an empty string, the SDK will get data in the chronological order of when members join the message thread.
The number of members that you expect to get on each page. The value range is [1,400].
If success, the list of members in a message thread is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Get the list of pinned conversations from the server with pagination.
The SDK returns the pinned conversations in the reverse chronological order of their pinning.
Optional
cursor: stringOptional
pageSize: numberThe list of retrieved conversations.
A description of the exception. See ChatError.
Gets the list of pinned messages in the conversation from the server.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The list of pinned messages. If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Gets the Reaction details.
The message ID.
The Reaction content.
Optional
cursor: stringThe cursor position from which to start getting Reactions.
Optional
pageSize: numberThe number of Reactions you expect to get on each page.
If success, the SDK returns the Reaction details and the cursor for the next query. The SDK returns null
if all the data is fetched.
If a failure occurs, an exception is thrown.
A description of the exception. See ChatError.
Gets the list of Reactions.
The message ID list.
The group ID, which is invalid only when the chat type is group chat.
The chat type.
If success, the Reaction list is returned; otherwise, an exception is thrown.
A description of the exception. See ChatError.
Gets all languages supported by the translation service.
The list of languages supported for translation.
A description of the exception. See ChatError.
Gets all conversations from the local database.
Conversations will be first retrieved from the memory. If no conversation is found, the SDK retrieves from the local database.
The retrieved conversations.
A description of the exception. See ChatError.
Gets the conversation by conversation ID and conversation type.
The conversation ID.
The conversation type. See ChatConversationType.
Whether to create a conversation if the specified conversation is not found:
true
: Yes.false
: No.Whether the conversation is a thread conversation.
false
: No.true
: Yes.The retrieved conversation object. The SDK returns null
if the conversation is not found.
A description of the exception. See ChatError.
Gets the message count of the conversation.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The message count. getMessageCount
A description of the exception. See ChatError.
Gets the unread message count of the conversation.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The unread message count.
A description of the exception. See ChatError.
Gets messages that the specified user sends in a conversation in a certain period.
This method gets data from the local database.
note If the conversation object does not exist, this method will create it.
Optional
count?: numberOptional
direction?: ChatSearchDirectionOptional
isOptional
searchOptional
sender?: stringOptional
timestamp?: numberThe list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
ChatSearchDirection.UP
: Messages are retrieved in the descending order of the Unix timestamp included in them.ChatSearchDirection.DOWN
: Messages are retrieved in the ascending order of the Unix timestamp included in them.A description of the exception. See ChatError.
Gets the latest message from the conversation.
Note
The operation does not change the unread message count. If the conversation object does not exist, this method will create it.
The SDK gets the latest message from the memory first. If no message is found, the SDK loads the message from the local database and then puts it in the memory.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The message instance. The SDK returns undefined
if the message does not exist.
A description of the exception. See ChatError.
Gets the latest received message from the conversation.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The message instance. The SDK returns undefined
if the message does not exist.
A description of the exception. See ChatError.
Gets a message from the local database by message ID.
The message ID.
The message.
A description of the exception. See ChatError.
Gets the pinning information of a message.
The message ID.
The message pinning information. If the message does not exit or is not pinned, undefined
is returned.
A description of the exception. See ChatError.
Retrieves messages of a specified quantity in a conversation from the local database.
The retrieved messages will also be put in the conversation in the memory according to the timestamp included in them.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The starting message ID for query. After this parameter is set, the SDK retrieves messages, starting from the specified one, according to the message search direction. If this parameter is set an empty string, the SDK retrieves messages according to the message search direction while ignoring this parameter.
The message search direction. See ChatSearchDirection.
ChatSearchDirection.UP
: Messages are retrieved in the descending order of the Unix timestamp included in them.ChatSearchDirection.DOWN
: Messages are retrieved in the ascending order of the Unix timestamp included in them.The maximum number of messages to retrieve each time. The value range is [1,50].
Whether the conversation is a thread conversation.
The list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
Gets messages that the specified user sends in a conversation in a certain period.
This method gets data from the local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The keywords for query.
The message search direction. See ChatSearchDirection.
ChatSearchDirection.UP
: Messages are retrieved in the descending order of the Unix timestamp included in them.ChatSearchDirection.DOWN
: Messages are retrieved in the ascending order of the Unix timestamp included in them.The starting Unix timestamp in the message for query. The unit is millisecond. After this parameter is set, the SDK retrieves messages, starting from the specified one, according to the message search direction. If you set this parameter as a negative value, the SDK retrieves messages, starting from the current time, in the descending order of the timestamp included in them.
The maximum number of messages to retrieve each time. The value range is [1,400].
Optional
sender: stringThe user ID or group ID for retrieval. Usually, it is the conversation ID.
Whether the conversation is a thread conversation.
The list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
2023-07-24 This method is deprecated. Use getConvMsgsWithKeyword instead.
Retrieves messages of a certain type in the conversation from the local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The message type. See ChatMessageType.
The message search direction. See ChatSearchDirection.
ChatSearchDirection.UP
: Messages are retrieved in the descending order of the Unix timestamp included in them.ChatSearchDirection.DOWN
: Messages are retrieved in the ascending order of the Unix timestamp included in them.The starting Unix timestamp in the message for query. The unit is millisecond. After this parameter is set, the SDK retrieves messages, starting from the specified one, according to the message search direction. If you set this parameter as a negative value, the SDK retrieves messages, starting from the current time, in the descending order of the timestamp included in them.
The maximum number of messages to retrieve each time. The value range is [1,400].
Optional
sender: stringThe user ID or group ID for retrieval. Usually, it is the conversation ID.
Whether the conversation is a thread conversation.
The list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
2023-07-24. Use getMsgsWithMsgType instead.
Gets the details of the message thread from the memory.
The message thread ID.
If success, the details of the message thread are returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Retrieves messages that are sent and received in a certain period in a conversation in the local database.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The starting Unix timestamp for query, in milliseconds.
The ending Unix timestamp for query, in milliseconds.
The message search direction. See ChatSearchDirection.
ChatSearchDirection.UP
: Messages are retrieved in the descending order of the Unix timestamp included in them.ChatSearchDirection.DOWN
: Messages are retrieved in the ascending order of the Unix timestamp included in them.The maximum number of messages to retrieve each time. The value range is [1,400].
Whether the conversation is a thread conversation.
The list of retrieved messages (excluding with the ones with the starting or ending timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
2023-07-24 This method is deprecated. Use getMsgWithTimestamp instead.
Retrieves messages of a specified quantity in a conversation from the local database.
The retrieved messages will also be put in the conversation in the memory according to the timestamp included in them.
note If the conversation object does not exist, this method will create it.
Optional
direction?: ChatSearchDirectionOptional
isOptional
loadThe list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Retrieves messages with keywords from the local database.
Optional
direction?: ChatSearchDirectionOptional
from?: stringOptional
maxOptional
searchOptional
timestamp?: numberThe list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Retrieves messages of a certain type in the conversation from the local database.
note If the conversation object does not exist, this method will create it.
Optional
count?: numberOptional
direction?: ChatSearchDirectionOptional
isOptional
sender?: stringOptional
timestamp?: numberThe list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Retrieves messages that are sent and received in a certain period in a conversation in the local database.
note If the conversation object does not exist, this method will create it.
Optional
count?: numberOptional
direction?: ChatSearchDirectionOptional
isThe list of retrieved messages (excluding with the ones with the starting or ending timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Gets the pinned messages in a local conversation.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
The list of pinned messages. If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
Gets the list of Reactions from a message.
The message ID.
If success, the Reaction list is returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Gets the thread conversation by conversation ID.
The conversation ID.
Whether to create a conversation if the specified conversation is not found:
true
: Yes.false
: No.The retrieved conversation object. The SDK returns null
if the conversation is not found.
A description of the exception. See ChatError.
Gets the count of the unread messages.
The count of the unread messages.
A description of the exception. See ChatError.
Gets the number of members that have read the group message.
The message ID.
If success, the SDK returns the number of members that have read the group message; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Imports messages to the local database.
You can only import messages that you sent or received.
The messages to import.
A description of the exception. See ChatError.
Inserts a message to the conversation in the local database.
For example, when a notification messages is received, a message can be constructed and written to the conversation. If the message to insert already exits (msgId or localMsgId is existed), the insertion fails.
The message will be inserted based on the Unix timestamp included in it. Upon message insertion, the SDK will automatically update attributes of the conversation, including latestMessage
.
The message to be inserted.
A description of the exception. See ChatError.
Joins a message thread.
Each member of the group where the message thread belongs can call this method.
In a multi-device login scenario, note the following:
The devices will receive the ChatMultiDeviceEventListener.onThreadEvent callback.
You can listen for message thread events by setting ChatMultiDeviceEventListener.
The message thread ID.
If success, the message thread details ChatMessageThread are returned; otherwise, an exception will be thrown.
A description of the exception. See ChatError.
Leaves a message thread.
Each member in the message thread can call this method.
In a multi-device login scenario, note the following:
The devices will receive the ChatMultiDeviceEventListener.onThreadEvent callback.
You can listen for message thread events by setting ChatMultiDeviceEventListener.
The ID of the message thread that the current user wants to leave.
A description of the exception. See ChatError.
Marks all conversations as read.
This method is for the local conversations only.
A description of the exception. See ChatError.
Marks all messages as read.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Marks a message as read.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The message ID.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Modifies a message.
After this method is called to modify a message, both the local message and the message on the server are modified.
This method can only modify a text message in one-to-one chats or group chats, but not in chat rooms.
The ID of the message to modify.
The modified text message body. See ChatTextMessageBody.
The modified message. See ChatMessageBody.
A description of the exception. See ChatError.
Sets whether to pin a conversation.
The conversation ID.
Whether to pin a conversation:
true
:Yes.false
: No. The conversation is unpinned.A description of the exception. See ChatError.
Pins a message.
The message ID.
A description of the exception. See ChatError.
Recalls the sent message.
The message ID.
A description of the exception. See ChatError.
Deletes the specified conversation and its historical messages from the server.
The conversation ID.
The conversation type. See ChatConversationType.
Whether to delete the historical messages with the conversation.
true
: Yes.false
: No.A description of the exception. See ChatError.
Removes a member from the message thread.
Only the owner or admins of the group where the message thread belongs and the message thread creator can call this method.
The removed member will receive the ChatMessageEventListener.onChatMessageThreadUserRemoved callback.
You can listen for message thread events by setting ChatMessageEventListener.
The message thread ID.
The user ID of the member to be removed from the message thread.
A description of the exception. See ChatError.
Removes the message listener.
The message listener to remove.
Deletes messages from the conversation (from both local storage and server).
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation Type.
The IDs of messages to delete from the current conversation.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Deletes messages from the conversation (from both local storage and server).
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation Type.
The message timestamp in millisecond. The messages with the timestamp smaller than the specified one will be deleted.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Deletes a Reaction.
The Reaction to delete.
The message ID.
A description of the exception. See ChatError.
Reports an inappropriate message.
The ID of the message to report.
The tag of the inappropriate message. You need to type a custom tag, like porn
or ad
.
The reporting reason. You need to type a specific reason.
A description of the exception. See ChatError.
Resends a message.
The message object to be resent.
The listener that listens for message changes.
A description of the exception. See ChatError.
Retrieves messages with keywords in a conversation from the local database.
The keywords for query.
The starting Unix timestamp in the message for query. The unit is millisecond. After this parameter is set, the SDK retrieves messages, starting from the specified one, according to the message search direction. If you set this parameter as a negative value, the SDK retrieves messages, starting from the current time, in the descending order of the timestamp included in them.
The maximum number of messages to retrieve each time. The value range is [1,400].
The user ID or group ID for retrieval. Usually, it is the conversation ID.
The message search direction. See ChatSearchDirection.
- (Default) ChatSearchDirection.Up
: Messages are retrieved in the descending order of the Unix timestamp included in them.
- ChatSearchDirection.Down
: Messages are retrieved in the ascending order of the Unix timestamp included in them.
The list of retrieved messages (excluding the one with the starting timestamp). If no message is obtained, an empty list is returned.
A description of the exception. See ChatError.
2024-04-22. Use getMsgsWithKeyword instead.
Sends the conversation read receipt to the server.
Note
The conversation ID.
A description of the exception. See ChatError.
Sends the group message receipt to the server.
Note
true
.The message ID.
The group ID.
Optional
opt: { The extension information, which is a custom keyword that specifies a custom action or command.
A description of the exception. See ChatError.
Sends a message.
Note
The message object to be sent. Ensure that you set this parameter.
Optional
callback: ChatMessageStatusCallbackThe listener that listens for message changes.
A description of the exception. See ChatError.
Sends the read receipt to the server.
This method applies to one-to-one chats only.
Note
This method takes effect only when you set ChatOptions.requireAck as true
.
To send a group message read receipt, you can call sendGroupMessageReadAck.
We recommend that you call sendConversationReadAck when opening the chat page. In other cases, you can call this method to reduce the number of method calls.
The message for which the read receipt is to be sent.
A description of the exception. See ChatError.
Sets the extension information of the conversation.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The extension information. This parameter must be key-value type.
Whether the conversation is a thread conversation.
Translates a text message.
The text message to translate.
The target languages.
The translation.
A description of the exception. See ChatError.
Unpins a message.
The message ID.
A description of the exception. See ChatError.
Changes the name of the message thread.
Only the owner or admins of the group where the message thread belongs and the message thread creator can call this method.
Each member of the group to which the message thread belongs will receive the ChatMessageEventListener.onChatMessageThreadUpdated callback.
You can listen for message thread events by setting ChatMessageEventListener.
The message thread ID.
The new message thread name. It can contain a maximum of 64 characters.
A description of the exception. See ChatError.
Updates a message in the local database.
After you modify a message, the message ID remains unchanged and the SDK automatically updates properties of the conversation, like latestMessage
.
note If the conversation object does not exist, this method will create it.
The conversation ID.
The conversation type. See ChatConversationType.
The ID of the message to update.
Whether the conversation is a thread conversation.
A description of the exception. See ChatError.
Updates the local message.
The message will be updated both in the memory and local database.
The updated message.
A description of the exception. See ChatError.
Protected
Static
_callProtected
Static
checkProtected
Static
handleOptional
callback: ChatGroupFileStatusCallbackProtected
Static
handleOptional
callback: ChatMessageStatusCallback
The chat manager class, responsible for sending and receiving messages, managing conversations (including loading and deleting conversations), and downloading attachments.
The sample code for sending a text message is as follows: