insert Outgoing Message
Inserts a message into the local conversation.
This message is only inserted into the local conversation and will not be sent to the server or the other party. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise, the callback PARAMETER_ERROR will be triggered.
Parameters
The type of conversation.
The ID of the conversation. For example, in a private conversation, it is the ID of the other party; in a group conversation, it is the group ID; in a discussion group conversation, it is the ID of the discussion group.
The sending status Message.SentStatus.
The message content. For example, TextMessage, ImageMessage, etc.
The callback to get the message sending entity.
Inserts a message into the local conversation with the direction set to sent.
This message is only inserted into the local conversation and will not be actually sent to the server or the recipient. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise the callback PARAMETER_ERROR will be triggered.
Parameters
The type of the conversation.
The ID of the conversation. For example, in a one-to-one chat, it is the ID of the other party; in a group chat, it is the group ID; in a discussion group, it is the ID of the discussion group.
The sending status Message.SentStatus.
The content of the message, such as TextMessage, ImageMessage, etc.
The sending time of the message getSentTime.
The callback to obtain the message sending entity.