删除公告,消息撤回优化
This commit is contained in:
@@ -55,8 +55,8 @@ const notifyMsgTypes = [
|
||||
IMLib.ObjectName.Location,
|
||||
IMLib.ObjectName.Voice,
|
||||
IMLib.ObjectName.HQVoice,
|
||||
IMLib.ObjectName.Sight,
|
||||
IMLib.ObjectName.GroupNotification
|
||||
IMLib.ObjectName.Sight,
|
||||
IMLib.ObjectName.GroupNotification
|
||||
]
|
||||
|
||||
const imLibListeners = () => {
|
||||
@@ -72,7 +72,7 @@ const imLibListeners = () => {
|
||||
checkContactExists(message)
|
||||
if (utils.inArray(message.objectName, notifyMsgTypes)) {
|
||||
onReceiveMessage(message)
|
||||
} else if (message.objectName === IMLib.ObjectName.ProfileNotification) {
|
||||
} else if (message.objectName === IMLib.ObjectName.ProfileNotification) {
|
||||
uni.$emit('onUpdateProfile_' + message.targetId)
|
||||
// 更新联系人信息
|
||||
store.dispatch('updateContact', JSON.parse(message.content.data))
|
||||
@@ -119,10 +119,16 @@ const imLibListeners = () => {
|
||||
uni.$emit('onReadReceiptReceived', data)
|
||||
})
|
||||
// 监听消息撤回操作
|
||||
IMLib.addRecallMessageListener((res) => {
|
||||
IMLib.getMessage(res.data.messageId, (res) => {
|
||||
console.error("消息撤回: ", res.message);
|
||||
uni.$emit('onRecallMessage', res.message)
|
||||
IMLib.addRecallMessageListener(({
|
||||
data
|
||||
}) => {
|
||||
IMLib.getMessage(data.messageId, ({
|
||||
message
|
||||
}) => {
|
||||
console.error("消息撤回: ", message);
|
||||
im.setNotifyBadge()
|
||||
uni.$emit('onReceiveMessage', message)
|
||||
uni.$emit('onRecallMessage_' + message.targetId, message)
|
||||
})
|
||||
})
|
||||
// 监听需要群聊消息回执
|
||||
|
||||
Reference in New Issue
Block a user