差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 | 后一修订版 两侧同时换到之后的修订记录 | ||
im:other:integrationcases:snapchat [2019/07/02 04:34] 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> | ||
===== 接收阅后即焚消息,查看后发送回执并删除本地消息 ===== | ===== 接收阅后即焚消息,查看后发送回执并删除本地消息 ===== | ||