Skip to content

Commit

Permalink
Merge branch 'calendar' into 'master'
Browse files Browse the repository at this point in the history
[qmfclient] don't return calendar invitation as attachment MER#1587.

See merge request !5
  • Loading branch information
Andrew Branson committed Jul 3, 2017
2 parents d71ea8a + 81300c6 commit 8680704
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qmf/src/libraries/qmfclient/qmailmessage.cpp
Expand Up @@ -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);

Expand All @@ -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();
}
Expand Down

0 comments on commit 8680704

Please sign in to comment.