(raw, encoding)
| 89 | * @return {Object<message, signedMessage, attachments>} parsed content separated in message, signed content and attachments |
| 90 | */ |
| 91 | export async function parseSignedMessage(raw, encoding) { |
| 92 | const {message, attachments, parsed} = await parseMIME(raw, encoding); |
| 93 | const [{signedMessage}] = filterBodyParts(parsed, 'signed'); |
| 94 | return {message, signedMessage, attachments}; |
| 95 | } |
| 96 | |
| 97 | // attribution: https://github.com/whiteout-io/mail-html5 |
| 98 | export function filterBodyParts(bodyParts, type, result) { |
no test coverage detected