提交 5fc2a1ad 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 消息发送者为非staff角色的管理员时,不能点击的问题

上级 cb45a841
......@@ -125,8 +125,9 @@
if(this.uniIDHasRole('staff')){
return true
}
const {group_member} = uniIm.convasation?.dataList?.find(item => item.id === this.msg.conversation_id)||{}
return group_member ? group_member[currentUserId]?.role.includes('admin') : false
const {conversation_id,from_uid} = this.msg
const {group_member} = uniIm.conversation.getCached(conversation_id)
return group_member ? group_member[from_uid]?.role.includes('admin') : false
}
},
methods: {
......@@ -156,15 +157,15 @@
})
},
privateChat(user_id) {
if (this.canPrivateChat) {
if (uniIm.isWidescreen) {
uni.$emit('uni-im-toChat', {
user_id
})
} else {
uni.navigateTo({
url: '/uni_modules/uni-im/pages/chat/chat?user_id=' + user_id,
animationDuration: 300
if (this.canPrivateChat) {
if (uniIm.isWidescreen) {
uni.$emit('uni-im-toChat', {
user_id
})
} else {
uni.navigateTo({
url: '/uni_modules/uni-im/pages/chat/chat?user_id=' + user_id,
animationDuration: 300
})
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册