Commit 81300c6b authored by Damien Caliste's avatar Damien Caliste

[qmfclient] don't return calendar invitation as attachment MER#1587.

parent f5006050
......@@ -1178,6 +1178,9 @@ namespace findAttachments
bool isText = (contentType.type().toLower() == "text") &&
((contentType.subType().toLower() == "plain") || (contentType.subType().toLower() == "html"));
bool isCalendar = (contentType.type().toLower() == "text") &&
(contentType.subType().toLower() == "calendar");
bool isInLine = (!part.contentDisposition().isNull()) &&
(part.contentDisposition().type() == QMailMessageContentDisposition::Inline);
......@@ -1189,7 +1192,7 @@ namespace findAttachments
// Attached messages are considered as attachments even if content disposition
// is inline instead of attachment, but only if they aren't text/plain nor text/html
if (isRFC822 || isAttachment || (isInLine && !isText)) {
if (isRFC822 || isAttachment || (isInLine && !isText && !isCalendar)) {
if (found) {
*found << part.location();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment