From ae7ac1be296ab362ac98c55345c66811ce591f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20J=2E=20Hern=C3=A1ndez=20Blasco?= Date: Thu, 5 Mar 2015 00:02:19 +0100 Subject: [PATCH] oc-mail: Return sharing properties on sharing object mail message When it is asked for available properties for an specific message. --- OpenChange/MAPIStoreMailMessage.m | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index cf6e019de..156d7e558 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -154,6 +154,30 @@ static Class NSExceptionK; return [sogoObject date]; } +- (enum mapistore_error) getAvailableProperties: (struct SPropTagArray **) propertiesP + inMemCtx: (TALLOC_CTX *) memCtx +{ + BOOL listedProperties[65536]; + NSUInteger count; + uint16_t propId; + + if (mailIsSharingObject) + { + memset (listedProperties, NO, 65536 * sizeof (BOOL)); + [super getAvailableProperties: propertiesP inMemCtx: memCtx]; + for (count = 0; count < (*propertiesP)->cValues; count++) + { + propId = ((*propertiesP)->aulPropTag[count] >> 16) & 0xffff; + listedProperties[propId] = YES; + } + [MAPIStoreSharingMessage fillAvailableProperties: *propertiesP + withExclusions: listedProperties]; + return MAPISTORE_SUCCESS; + } + else + return [super getAvailableProperties: propertiesP inMemCtx: memCtx]; +} + static NSComparisonResult _compareBodyKeysByPriority (id entry1, id entry2, void *data) {