diff --git a/NEWS b/NEWS index cf81a2201..1562d099d 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ master ------ Enhancements + - 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) - Appointment color and importance work now between Outlooks diff --git a/OpenChange/MAPIStoreMailAttachment.m b/OpenChange/MAPIStoreMailAttachment.m index e21fc7925..388ad924d 100644 --- a/OpenChange/MAPIStoreMailAttachment.m +++ b/OpenChange/MAPIStoreMailAttachment.m @@ -163,8 +163,15 @@ - (int) getPidTagDisplayName: (void **) data inMemCtx: (TALLOC_CTX *) memCtx { - *data = [[bodyInfo objectForKey: @"description"] - asUnicodeInMemCtx: memCtx]; + NSString *fileName; + + fileName = [self _fileName]; + if ([fileName isEqualToString: @"sharing_metadata.xml"]) + /* Required to disallow user from seeing the attachment by default */ + *data = [@"sharing_metadata.xml" asUnicodeInMemCtx: memCtx]; + else + *data = [[bodyInfo objectForKey: @"description"] + asUnicodeInMemCtx: memCtx]; return MAPISTORE_SUCCESS; } @@ -181,11 +188,17 @@ - (int) getPidTagAttachMimeTag: (void **) data inMemCtx: (TALLOC_CTX *) memCtx { - NSString *mimeTag; + NSString *mimeTag, *fileName; + + fileName = [self _fileName]; + if ([fileName isEqualToString: @"sharing_metadata.xml"]) + /* Required by [MS-OXWSMSHR] Section 3.1.1 */ + mimeTag = [NSString stringWithFormat: @"application/x-sharing-metadata-xml"]; + else + mimeTag = [NSString stringWithFormat: @"%@/%@", + [bodyInfo objectForKey: @"type"], + [bodyInfo objectForKey: @"subtype"]]; - mimeTag = [NSString stringWithFormat: @"%@/%@", - [bodyInfo objectForKey: @"type"], - [bodyInfo objectForKey: @"subtype"]]; *data = [[mimeTag lowercaseString] asUnicodeInMemCtx: memCtx]; return MAPISTORE_SUCCESS;