Commit 8680704f authored by Andrew Branson's avatar Andrew Branson

Merge branch 'calendar' into 'master'

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

See merge request !5
parents d71ea8ab 81300c6b
......@@ -1169,6 +1169,9 @@ namespace findAttachments
bool isText = (contentType.matches("text", "plain")
|| contentType.matches("text", "html"));
bool isCalendar = (contentType.type().toLower() == "text") &&
(contentType.subType().toLower() == "calendar");
bool isInLine = (!part.contentDisposition().isNull()) &&
(part.contentDisposition().type() == QMailMessageContentDisposition::Inline);
......@@ -1179,7 +1182,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