diff --git a/components/uni-im-msg/types/rich-text.vue b/components/uni-im-msg/types/rich-text.vue index 06b803bf42b1b7b38ea75823b1304707f4509bc0..a41b00ad279974b0b38c61ebdfd4d7d4d2fd9c25 100644 --- a/components/uni-im-msg/types/rich-text.vue +++ b/components/uni-im-msg/types/rich-text.vue @@ -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 }) } }