diff --git a/webmail/webmail.js b/webmail/webmail.js index e2acc49121..8886db1474 100644 --- a/webmail/webmail.js +++ b/webmail/webmail.js @@ -2919,7 +2919,7 @@ const newMsgView = (miv, msglistView, listMailboxes, possibleLabels, messageLoad 'image/apng', 'image/svg+xml', ]; - const isText = (a) => a.Part.MediaType.toLowerCase() === 'text'; + const isText = (a) => ['text', 'message'].includes(a.Part.MediaType.toLowerCase()); const isImage = (a) => imageTypes.includes((a.Part.MediaType + '/' + a.Part.MediaSubType).toLowerCase()); const isPDF = (a) => (a.Part.MediaType + '/' + a.Part.MediaSubType).toLowerCase() === 'application/pdf'; const isViewable = (a) => isText(a) || isImage(a) || isPDF(a); diff --git a/webmail/webmail.ts b/webmail/webmail.ts index 13b7a7918c..6f21fa92c1 100644 --- a/webmail/webmail.ts +++ b/webmail/webmail.ts @@ -2466,7 +2466,7 @@ const newMsgView = (miv: MsgitemView, msglistView: MsglistView, listMailboxes: l 'image/apng', 'image/svg+xml', ] - const isText = (a: api.Attachment) => a.Part.MediaType.toLowerCase() === 'text' + const isText = (a: api.Attachment) => ['text', 'message'].includes(a.Part.MediaType.toLowerCase()) const isImage = (a: api.Attachment) => imageTypes.includes((a.Part.MediaType + '/' + a.Part.MediaSubType).toLowerCase()) const isPDF = (a: api.Attachment) => (a.Part.MediaType+'/'+a.Part.MediaSubType).toLowerCase() === 'application/pdf' const isViewable = (a: api.Attachment) => isText(a) || isImage(a) || isPDF(a)