diff --git a/ChangeLog b/ChangeLog index 921597a75..2dc5c6932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-02-13 Wolfgang Sourdeau + + * OpenChange/MAPIStoreMailMessageTable.m + (-getChildProperty:forKey:withTag:): enhanced treatment of + PR_BODY_UNICODE to accept text/plain parts when more than one is + available, by selecting the first one only. This requires the + prior detection of text/html parts in order to exclude the + property or not. + 2011-02-11 Wolfgang Sourdeau * OpenChange/MAPIStoreContext.m diff --git a/OpenChange/MAPIStoreMailMessageTable.m b/OpenChange/MAPIStoreMailMessageTable.m index fa00b8f3b..988c7a9d7 100644 --- a/OpenChange/MAPIStoreMailMessageTable.m +++ b/OpenChange/MAPIStoreMailMessageTable.m @@ -331,28 +331,26 @@ static EOQualifier *nonDeletedQualifier = nil; case PR_BODY_UNICODE: { NSMutableArray *keys; - NSArray *acceptedTypes; child = [self lookupChild: childKey]; - acceptedTypes = [NSArray arrayWithObjects: @"text/plain", - @"text/html", nil]; keys = [NSMutableArray array]; [child addRequiredKeysOfStructure: [child bodyStructure] path: @"" toArray: keys - acceptedTypes: acceptedTypes]; - if ([keys count] == 0 || [keys count] == 2) + acceptedTypes: [NSArray arrayWithObject: + @"text/html"]]; + if ([keys count] > 0) { *data = NULL; rc = MAPI_E_NOT_FOUND; } else { - acceptedTypes = [NSArray arrayWithObject: @"text/plain"]; [keys removeAllObjects]; [child addRequiredKeysOfStructure: [child bodyStructure] path: @"" toArray: keys - acceptedTypes: acceptedTypes]; + acceptedTypes: [NSArray arrayWithObject: + @"text/plain"]]; if ([keys count] > 0) { id result;