Treat messages as text

This commit is contained in:
Matt Fellenz 2023-11-01 14:17:02 -07:00
parent d1e93020d8
commit 3b6e1851cb
No known key found for this signature in database
GPG key ID: D0061A7BB596E3B3
2 changed files with 2 additions and 2 deletions

View file

@ -2915,7 +2915,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);

View file

@ -2463,7 +2463,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)