mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: Save content_type, multipart information to email message model (#2774)
This commit is contained in:
@@ -143,6 +143,7 @@ export default {
|
||||
|
||||
const {
|
||||
email: {
|
||||
content_type: contentType = '',
|
||||
html_content: { full: fullHTMLContent, reply: replyHTMLContent } = {},
|
||||
text_content: { full: fullTextContent, reply: replyTextContent } = {},
|
||||
} = {},
|
||||
@@ -156,7 +157,12 @@ export default {
|
||||
if (contentToBeParsed && this.isIncoming) {
|
||||
const parsedContent = this.stripStyleCharacters(contentToBeParsed);
|
||||
if (parsedContent) {
|
||||
return parsedContent.replace(/\n/g, '<br />');
|
||||
// This is a temporary fix for line-breaks in text/plain emails
|
||||
// Now, It is not rendered properly in the email preview.
|
||||
// FIXME: Remove this once we have a better solution for rendering text/plain emails
|
||||
return contentType.includes('text/plain')
|
||||
? parsedContent.replace(/\n/g, '<br />')
|
||||
: parsedContent;
|
||||
}
|
||||
}
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user