mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +00:00
oc-mail: Use body.peek to preload message bodies
In this way, we do not modify the flags (\Seen) on preloading. The IMAP server returns the content without .peek section so it is removed. This also performs the modification intended by the following Pull Request: https://github.com/Zentyal/sogo/pull/50 That tried to avoid set \Seen flag when preloading message bodies on synchronisation. But in this case we are not incrementing the modseq as we are not modifying any messages flags.
This commit is contained in:
1
NEWS
1
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)
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user