差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 上一修订版 两侧同时换到之后的修订记录 | ||
im:web:basics:message [2022/01/17 07:56] zhangdong [删除会话] |
im:web:basics:message [2022/01/18 06:56] zhangdong [消息回执] |
||
---|---|---|---|
行 852: | 行 852: | ||
msg.set({ | msg.set({ | ||
msg: 'message content', // 消息内容 | msg: 'message content', // 消息内容 | ||
- | to: 'username', // 接收消息对象(用户id) | + | to: 'groupId' |
chatType: 'groupChat', // 设置为群聊 | chatType: 'groupChat', // 设置为群聊 | ||
success: function (id, serverMsgId) { | success: function (id, serverMsgId) { | ||
行 871: | 行 871: | ||
let msg = new WebIM.message("read", WebIM.conn.getUniqueId()); | let msg = new WebIM.message("read", WebIM.conn.getUniqueId()); | ||
msg.set({ | msg.set({ | ||
- | id:message.id, // 需要发送已读回执的消息id | + | id: message.id, // 需要发送已读回执的消息id |
- | to: 'groupId', | + | to: message.from, // 消息的发送方 |
msgConfig: { allowGroupAck: true }, | msgConfig: { allowGroupAck: true }, | ||
ackContent: JSON.stringify({}) // 回执内容 | ackContent: JSON.stringify({}) // 回执内容 |