From e34fe1c614e2bc9e1eaa7335b62782ac88a8a8b4 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Sun, 20 Jun 2021 19:25:36 +0530 Subject: [PATCH] fix: Fix the sender tooltip getting `undefined` in bot messages (#2453) --- .../components/widgets/conversation/Message.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/conversation/Message.vue b/app/javascript/dashboard/components/widgets/conversation/Message.vue index eb6644c91..b866ef4e7 100644 --- a/app/javascript/dashboard/components/widgets/conversation/Message.vue +++ b/app/javascript/dashboard/components/widgets/conversation/Message.vue @@ -71,7 +71,7 @@ import BubbleText from './bubble/Text'; import BubbleImage from './bubble/Image'; import BubbleFile from './bubble/File'; import Spinner from 'shared/components/Spinner'; - +import { isEmptyObject } from 'dashboard/helper/commons'; import contentTypeMixin from 'shared/mixins/contentTypeMixin'; import BubbleActions from './bubble/Actions'; import { MESSAGE_TYPE, MESSAGE_STATUS } from 'shared/constants/messages'; @@ -95,11 +95,6 @@ export default { default: false, }, }, - data() { - return { - isHovered: false, - }; - }, computed: { message() { const botMessageContent = generateBotMessageContent( @@ -179,8 +174,7 @@ export default { }, sentByMessage() { const { sender } = this; - - return this.data.message_type === 1 && !this.isHovered && sender + return this.data.message_type === 1 && !isEmptyObject(sender) ? { content: `${this.$t('CONVERSATION.SENT_BY')} ${sender.name}`, classes: 'top',