From ef2611164d013e8b596794024800a931a290a66a Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Mon, 17 May 2021 11:16:50 +0530 Subject: [PATCH] fix: Use reply content if available (#2025) * fix: Use text_content reply if available * Use reply instead of full message from html_content --- .../dashboard/components/widgets/conversation/Message.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/conversation/Message.vue b/app/javascript/dashboard/components/widgets/conversation/Message.vue index 00dc6a500..bf39087cf 100644 --- a/app/javascript/dashboard/components/widgets/conversation/Message.vue +++ b/app/javascript/dashboard/components/widgets/conversation/Message.vue @@ -109,12 +109,14 @@ export default { ); const { - email: { html_content: { full: fullHTMLContent } = {} } = {}, + email: { + html_content: { full: fullHTMLContent, reply: replyHTMLContent } = {}, + } = {}, } = this.contentAttributes; - if (fullHTMLContent && this.isIncoming) { + if ((replyHTMLContent || fullHTMLContent) && this.isIncoming) { let parsedContent = new DOMParser().parseFromString( - fullHTMLContent || '', + replyHTMLContent || fullHTMLContent || '', 'text/html' ); if (!parsedContent.getElementsByTagName('parsererror').length) {