oc-calendar: Fix property values of invitation responses
The value of `PidTagResponseRequested` property in the invitation mail wasn't being set properly, while the `PidTagReplyRequested` property wasn't being set at all. This caused invitation response mails not to be sent. Both properties are expected to be `true`.pull/84/head
parent
54b405a83d
commit
0a285eedec
|
@ -35,6 +35,7 @@
|
||||||
{
|
{
|
||||||
BOOL headerSetup;
|
BOOL headerSetup;
|
||||||
BOOL mailIsEvent;
|
BOOL mailIsEvent;
|
||||||
|
BOOL mailIsMeetingRequest;
|
||||||
BOOL mailIsSharingObject;
|
BOOL mailIsSharingObject;
|
||||||
NSString *mimeKey;
|
NSString *mimeKey;
|
||||||
NSString *headerCharset;
|
NSString *headerCharset;
|
||||||
|
|
|
@ -118,6 +118,7 @@ static Class NSExceptionK, MAPIStoreSharingMessageK;
|
||||||
{
|
{
|
||||||
mimeKey = nil;
|
mimeKey = nil;
|
||||||
mailIsEvent = NO;
|
mailIsEvent = NO;
|
||||||
|
mailIsMeetingRequest = NO;
|
||||||
mailIsSharingObject = NO;
|
mailIsSharingObject = NO;
|
||||||
headerCharset = nil;
|
headerCharset = nil;
|
||||||
headerEncoding = nil;
|
headerEncoding = nil;
|
||||||
|
@ -258,7 +259,11 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
ASSIGN (headerCharset, [parameters objectForKey: @"charset"]);
|
ASSIGN (headerCharset, [parameters objectForKey: @"charset"]);
|
||||||
if ([headerMimeType isEqualToString: @"text/calendar"]
|
if ([headerMimeType isEqualToString: @"text/calendar"]
|
||||||
|| [headerMimeType isEqualToString: @"application/ics"])
|
|| [headerMimeType isEqualToString: @"application/ics"])
|
||||||
|
{
|
||||||
mailIsEvent = YES;
|
mailIsEvent = YES;
|
||||||
|
if ([[parameters objectForKey: @"method"] isEqualToString: @"REQUEST"])
|
||||||
|
mailIsMeetingRequest = YES;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sharingHeader = [[sogoObject mailHeaders] objectForKey: @"x-ms-sharing-localtype"];
|
sharingHeader = [[sogoObject mailHeaders] objectForKey: @"x-ms-sharing-localtype"];
|
||||||
|
@ -572,30 +577,23 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
||||||
return MAPISTORE_SUCCESS;
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: this applies to regular mails... */
|
- (int) getPidTagReplyRequested: (void **) data
|
||||||
// - (int) getPidTagReplyRequested: (void **) data // TODO
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// if (!headerSetup)
|
|
||||||
// [self _fetchHeaderData];
|
|
||||||
|
|
||||||
// return (mailIsEvent
|
|
||||||
// ? [self getYes: data inMemCtx: memCtx]
|
|
||||||
// : [self getNo: data inMemCtx: memCtx]);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* ... while this applies to invitations. */
|
|
||||||
- (int) getPidTagResponseRequested: (void **) data // TODO
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
if (!headerSetup)
|
if (!headerSetup)
|
||||||
[self _fetchHeaderData];
|
[self _fetchHeaderData];
|
||||||
|
|
||||||
return (mailIsEvent
|
return (mailIsMeetingRequest
|
||||||
? [self getNo: data inMemCtx: memCtx]
|
? [self getYes: data inMemCtx: memCtx]
|
||||||
: MAPISTORE_ERR_NOT_FOUND);
|
: MAPISTORE_ERR_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagResponseRequested: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
return [self getPidTagReplyRequested: data inMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
|
||||||
- (int) getPidTagLatestDeliveryTime: (void **) data // DOUBT
|
- (int) getPidTagLatestDeliveryTime: (void **) data // DOUBT
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue