diff --git a/NEWS b/NEWS index bae4a7cd6..e05997040 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ master ------ Enhancements + - Improve sync speed from Outlook by non-reprocessing already downloaded unread mails - Give support to calendar sharing invitations - Missing contact fields are now saved and available when sharing it (Office, Profession, Manager's name, Assistant's name, Spouse/Partner, Anniversary) diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 43f8e4d25..78471e49c 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -1500,6 +1500,15 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) { [bodyPartKeys addObject: bodyPartKey]; messageUid = [self messageUIDFromMessageKey: messageKey]; + /* If the bodyPartKey include peek, remove it as it is not returned + as key in the IMAP server response. + + IMAP conversation example: + a4 UID FETCH 1 (UID BODY.PEEK[text]) + * 1 FETCH (UID 1 BODY[TEXT] {1677} + */ + bodyPartKey = [bodyPartKey stringByReplacingOccurrencesOfString: @"body.peek" + withString: @"body"]; [keyAssoc setObject: bodyPartKey forKey: messageUid]; } } diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index b5caf3355..8c35f4265 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -1627,11 +1627,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data) if (!headerSetup) [self _fetchHeaderData]; - if ([mimeKey hasPrefix: @"body.peek"]) - bodyPartKey = [NSString stringWithFormat: @"body[%@]", - [mimeKey _strippedBodyKey]]; - else - bodyPartKey = mimeKey; + bodyPartKey = mimeKey; return bodyPartKey; }