(fix) fix search on for Outlook application (#4605 and #4607)

This commit is contained in:
Ludovic Marcotte
2018-11-29 14:08:10 -05:00
committed by leecher1337
parent 26e84aad4b
commit 562f67fc25
2 changed files with 6 additions and 2 deletions

View File

@@ -3103,7 +3103,8 @@ void handle_eas_terminate(int signum)
folderIdentifiers = [NSMutableArray array];
// Android 6 will send search requests with no collection ID - so we search in all folders.
if (!folderId)
// Outlook Mobile App sends search requests with CollectionId=0 - We treat this as an all-folder-search.
if (!folderId || [folderId isEqualToString: @"0"])
{
NSArray *foldersInCache;
SOGoCacheGCSObject *o;
@@ -3171,7 +3172,7 @@ void handle_eas_terminate(int signum)
[s appendFormat: @"<LongId>%@+%@</LongId>", folderId, itemId];
[s appendFormat: @"<CollectionId xmlns=\"AirSyncBase:\">%@</CollectionId>", folderId];
[s appendString: @"<Properties>"];
[s appendFormat: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: [mailObject activeSyncRepresentationInContext: context]];
[s appendString: @"</Properties>"];
[s appendFormat: @"</Result>"];
}
@@ -3939,6 +3940,8 @@ void handle_eas_terminate(int signum)
[map setObject: [currentAttachment objectForKey: @"mimetype"] forKey: @"content-type"];
[map setObject: [currentAttachment objectForKey: @"encoding"] forKey: @"content-transfer-encoding"];
[map addObject: [NSString stringWithFormat: @"attachment; filename=\"%@\"", [currentAttachment objectForKey: @"filename"]] forKey: @"content-disposition"];
if ([[currentAttachment objectForKey: @"bodyId"] length])
[map setObject: [currentAttachment objectForKey: @"bodyId"] forKey: @"content-id"];
bodyPart = [[[NGMimeBodyPart alloc] initWithHeader: map] autorelease];
fdata = [[NGMimeFileData alloc] initWithBytes:[bodydata bytes] length:[bodydata length]];

1
NEWS
View File

@@ -3,6 +3,7 @@
Bug fixes
- [eas] strip '<>' from bodyId and when forwarding mails
- [eas] fix search on for Outlook application (#4605 and #4607)
4.0.1 (2018-07-10)
------------------