fix(mail): improve decoding of ms-tnef body parts

- added decoding of meeting request & reponse
- added SOGoTnefDecoderDebugEnabled system default
This commit is contained in:
Francis Lachapelle
2021-08-06 15:28:35 -04:00
parent b39da3050b
commit 208f4366c4
6 changed files with 491 additions and 18 deletions
@@ -361,9 +361,23 @@
};
}
}
_.forEach(part.content, function(mixedPart) {
_visit(mixedPart);
var winmail = _.find(part.content, function(mixedPart) {
// Ignore empty content -- that could mean a decoding error server-side.
return mixedPart.type == 'UIxMailPartTnefViewer' && mixedPart.content.length > 0;
});
if (winmail && !_.find(part.content, function(mixedPart) {
return mixedPart.type == 'UIxMailPartAlternativeViewer';
})) {
// If there's no alternate part in the message, show the winmail.dat attachment only.
// Otherwise, show all parts.
_visit(winmail);
}
else {
_.forEach(part.content, function(mixedPart) {
_visit(mixedPart);
});
}
}
else {
if (angular.isUndefined(part.safeContent)) {