提交 21ebf604 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 解决消息内容包含关键词“个推”时会被拦截的问题

上级 5ca774b6
......@@ -1246,6 +1246,13 @@
let index = this.conversation.msgList.findIndex(i => i.unique_id == msg.unique_id)
// 生成新对象,否则不触发更新
msg = Object.assign({}, msg)
// 检查内容不是包含 个推 两个字,有则 改成 个 + 零宽字符 + 推
let tmpBody = JSON.stringify(msg.body)
if(tmpBody.includes('个推')){
msg.body = JSON.parse(tmpBody.replace(/个推/g,'个\u200b推'))
}
uniImCo.sendMsg(msg)
.then(async e => {
// console.log('uniImCo.sendMsg',{e,msg});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册