Skip to content

Commit

Permalink
Merge remote-tracking branch 'github.com/mattfbacon/mox/message-is-text'
Browse files Browse the repository at this point in the history
  • Loading branch information
mjl- committed Nov 2, 2023
2 parents 81057ee + 3b6e185 commit 38694d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webmail/webmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion webmail/webmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 38694d3

Please sign in to comment.