insertOutgoingMessage

public abstract void insertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, IRongCoreCallback.ResultCallback<Message> resultCallback)

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 recipient. The inserted message must be a persisted message, i.e., ISPERSISTED, otherwise, the callback RC_INVALID_PARAMETER_MSG_TAG will be triggered.

Since

5.0.0

Parameters

type

The conversation type.

targetId

The conversation ID. For private conversations, it is the recipient's ID; for group conversations, it is the group ID; for discussion group conversations, it is the discussion group ID.

sentStatus

The sending status Message.SentStatus.

content

The message content. For example, TextMessage, ImageMessage, etc.

resultCallback

The callback to obtain the message sending entity.


public abstract void insertOutgoingMessage(ConversationType type, String targetId, SentStatus sentStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback)

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 RC_INVALID_PARAMETER_MSG_TAG will be triggered.

Since

5.0.0

Parameters

type

The type of the conversation.

targetId

The ID of the conversation. For a private conversation, this is the ID of the other party; for a group conversation, this is the group ID; for a discussion group conversation, this is the ID of the discussion group.

sentStatus

The sending status Message.SentStatus.

content

The message content, such as TextMessage, ImageMessage, etc.

sentTime

The sending time of the message getSentTime.

resultCallback

The callback to obtain the message sending entity.