Const返回一个 RCResult 类型 Promise,data 结构为 IAReceivedMessage 类型
发送文本消息示例:
const content = {content: 'hello world'};
const message = new RongIMLib.TextMessage(content);
const conversation = {
conversationType: RongIMLib.ConversationType.PRIVATE,
targetId: 'targetId'
}
const sendRes = await RongIMLib.sendMessage(conversation, message);
console.info('消息发送结果:', sendRes);
发送消息