fix: Use reply content if available (#2025)
* fix: Use text_content reply if available * Use reply instead of full message from html_content
This commit is contained in:
@@ -109,12 +109,14 @@ export default {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
email: { html_content: { full: fullHTMLContent } = {} } = {},
|
email: {
|
||||||
|
html_content: { full: fullHTMLContent, reply: replyHTMLContent } = {},
|
||||||
|
} = {},
|
||||||
} = this.contentAttributes;
|
} = this.contentAttributes;
|
||||||
|
|
||||||
if (fullHTMLContent && this.isIncoming) {
|
if ((replyHTMLContent || fullHTMLContent) && this.isIncoming) {
|
||||||
let parsedContent = new DOMParser().parseFromString(
|
let parsedContent = new DOMParser().parseFromString(
|
||||||
fullHTMLContent || '',
|
replyHTMLContent || fullHTMLContent || '',
|
||||||
'text/html'
|
'text/html'
|
||||||
);
|
);
|
||||||
if (!parsedContent.getElementsByTagName('parsererror').length) {
|
if (!parsedContent.getElementsByTagName('parsererror').length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user