insertOutgoingMessage

public abstract void insertOutgoingMessage(ConversationType type, String targetId, String channelId, 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 it will trigger the callback RC_INVALID_PARAMETER_MSG_TAG.

Since

5.1.1

Parameters

type

The type of the conversation.

targetId

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

channelId

The business identifier of the conversation to which the message belongs.

sentStatus

The sending status Message.SentStatus.

content

The content of the message. Such as io.rong.message.TextMessage, etc.

sentTime

The sending time of the message getSentTime.

resultCallback

The callback to obtain the message sending entity.


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

Since

5.2.4

Parameters

type
targetId
channelId
canIncludeExpansion
sentStatus
content
sentTime
resultCallback