fix: Fix the sender tooltip getting undefined
in bot messages (#2453)
This commit is contained in:
parent
e45abebe39
commit
e34fe1c614
1 changed files with 2 additions and 8 deletions
|
@ -71,7 +71,7 @@ import BubbleText from './bubble/Text';
|
||||||
import BubbleImage from './bubble/Image';
|
import BubbleImage from './bubble/Image';
|
||||||
import BubbleFile from './bubble/File';
|
import BubbleFile from './bubble/File';
|
||||||
import Spinner from 'shared/components/Spinner';
|
import Spinner from 'shared/components/Spinner';
|
||||||
|
import { isEmptyObject } from 'dashboard/helper/commons';
|
||||||
import contentTypeMixin from 'shared/mixins/contentTypeMixin';
|
import contentTypeMixin from 'shared/mixins/contentTypeMixin';
|
||||||
import BubbleActions from './bubble/Actions';
|
import BubbleActions from './bubble/Actions';
|
||||||
import { MESSAGE_TYPE, MESSAGE_STATUS } from 'shared/constants/messages';
|
import { MESSAGE_TYPE, MESSAGE_STATUS } from 'shared/constants/messages';
|
||||||
|
@ -95,11 +95,6 @@ export default {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isHovered: false,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
message() {
|
message() {
|
||||||
const botMessageContent = generateBotMessageContent(
|
const botMessageContent = generateBotMessageContent(
|
||||||
|
@ -179,8 +174,7 @@ export default {
|
||||||
},
|
},
|
||||||
sentByMessage() {
|
sentByMessage() {
|
||||||
const { sender } = this;
|
const { sender } = this;
|
||||||
|
return this.data.message_type === 1 && !isEmptyObject(sender)
|
||||||
return this.data.message_type === 1 && !this.isHovered && sender
|
|
||||||
? {
|
? {
|
||||||
content: `${this.$t('CONVERSATION.SENT_BY')} ${sender.name}`,
|
content: `${this.$t('CONVERSATION.SENT_BY')} ${sender.name}`,
|
||||||
classes: 'top',
|
classes: 'top',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue