Only use message/rfc822 as embedded message

This commit is contained in:
Andris Reinman 2017-03-12 00:48:31 +02:00
parent afd85baa28
commit 27792bafca

View file

@ -37,10 +37,13 @@ class BodyStructure {
case 'text':
return this.processTextNode(node, options);
case 'message':
if (!options.attachmentRFC822) {
return this.processRFC822Node(node, options);
if (node.parsedHeader['content-type'].subtype === 'rfc822') {
if (!options.attachmentRFC822) {
return this.processRFC822Node(node, options);
}
return this.processAttachmentNode(node, options);
}
return this.processAttachmentNode(node, options);
// fall through
default:
return this.processAttachmentNode(node, options);
}