差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:other:integrationcases:snapchat [2018/09/25 10:39] jk |
im:other:integrationcases:snapchat [2021/06/15 06:22] zhangdong [发送阅后即焚消息] |
||
---|---|---|---|
行 52: | 行 52: | ||
</code> | </code> | ||
+ | === web/小程序示例 === | ||
+ | <code> | ||
+ | let id = conn.getUniqueId(); // 生成本地消息id | ||
+ | let msg = new WebIM.message('txt', id); // 创建文本消息 | ||
+ | msg.set({ | ||
+ | msg: '这是一条阅后即焚消息', // 消息内容 | ||
+ | to: 'username', // 接收消息对象(用户id) | ||
+ | chatType: 'singleChat', // 设置为单聊 | ||
+ | ext: {fire: true}, // 消息扩展,标记为阅后即焚 | ||
+ | success: function (id, serverMsgId) {}, | ||
+ | fail: function(e){} | ||
+ | }); | ||
+ | conn.send(msg.body); | ||
+ | </code> | ||
===== 接收阅后即焚消息,查看后发送回执并删除本地消息 ===== | ===== 接收阅后即焚消息,查看后发送回执并删除本地消息 ===== | ||
行 156: | 行 170: | ||
<WRAP half column> | <WRAP half column> | ||
- | 下一页:[[im:other:integrationcases:revokemessages|消息回撤]] | + | 下一页:[[im:other:integrationcases:revokemessages|消息撤回]] |
</WRAP> | </WRAP> | ||
</WRAP> | </WRAP> | ||