insertOutgoingMessage
public abstract void insertOutgoingMessage( ConversationType type, String targetId, String channelId, SentStatus sentStatus, MessageContent content, long sentTime, IRongCoreCallback.ResultCallback<Message> resultCallback)
向本地会话中插入一条消息,方向为发送。
这条消息只是插入本地会话,不会实际发送给服务器和对方。
插入消息需为入库消息,即 ISPERSISTED,否者会回调 RC_INVALID_PARAMETER_MSG_TAG
Since
5.1.1
Parameters
type
会话类型。
targetId
会话 id。比如私人会话时,是对方的 id; 群组会话时,是群 id; 讨论组会话时,则为该讨论组的 id。
channelId
消息所属会话的业务标识。
sentStatus
发送状态 Message.SentStatus
content
消息内容。如io.rong.message.TextMessageio.rong.message.ImageMessage 等。
sentTime
消息的发送时间 getSentTime 。
resultCallback
获得消息发送实体的回调。
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