merge of '4b9d34d20bce0208c3cf667d2c6e640fc0f7da7d'

and '84bd96711bb8cbccbe1b4ca017c6310b86d64421'

Monotone-Parent: 4b9d34d20bce0208c3cf667d2c6e640fc0f7da7d
Monotone-Parent: 84bd96711bb8cbccbe1b4ca017c6310b86d64421
Monotone-Revision: a1668784bf0e7d4c0f6537e4fd960651c40e912b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-02-23T23:28:27
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2012-02-23 23:28:27 +00:00
commit c497b03aa5
4 changed files with 37 additions and 17 deletions

View file

@ -1,5 +1,12 @@
2012-02-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoCalendarComponent.m
(-sendEMailUsingTemplateNamed:forObject:previousObject:toAttendees:withType:):
added a "msgType" parameter that is added as value to the new
"x-sogo-message-type" header.
(-sendIMIPReplyForEvent:from:to:): added a "x-sogo-message-type"
to the headers.
* OpenChange/MAPIStoreMailContext.m
(+listContextForUser:withTDBIndexing:inMemCtx:): make sure special
folders have all the "folder" prefixes appended to their list of

View file

@ -411,9 +411,10 @@
}
[self sendEMailUsingTemplateNamed: @"Update"
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: oldEvent
toAttendees: updateAttendees];
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: oldEvent
toAttendees: updateAttendees
withType: @"calendar:invitation-update"];
[self sendReceiptEmailUsingTemplateNamed: @"Update"
forObject: newEvent to: updateAttendees];
}
@ -573,7 +574,8 @@
[self sendEMailUsingTemplateNamed: @"Deletion"
forObject: [newEvent itipEntryWithMethod: @"cancel"]
previousObject: oldEvent
toAttendees: attendees];
toAttendees: attendees
withType: @"calendar:cancellation"];
[self sendReceiptEmailUsingTemplateNamed: @"Deletion"
forObject: newEvent to: attendees];
}
@ -627,9 +629,10 @@
return ex;
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: oldEvent
toAttendees: attendees];
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: oldEvent
toAttendees: attendees
withType: @"calendar:invitation"];
[self sendReceiptEmailUsingTemplateNamed: @"Invitation"
forObject: newEvent to: attendees];
}
@ -694,7 +697,8 @@
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: nil
toAttendees: attendees];
toAttendees: attendees
withType: @"calendar:invitation"];
[self sendReceiptEmailUsingTemplateNamed: @"Invitation"
forObject: newEvent to: attendees];
}
@ -1001,7 +1005,8 @@
[self sendEMailUsingTemplateNamed: @"Deletion"
forObject: [event itipEntryWithMethod: @"cancel"]
previousObject: nil
toAttendees: delegates];
toAttendees: delegates
withType: @"calendar:cancellation"];
[self sendReceiptEmailUsingTemplateNamed: @"Deletion"
forObject: event
to: delegates];
@ -1022,7 +1027,8 @@
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [event itipEntryWithMethod: @"request"]
previousObject: nil
toAttendees: delegates];
toAttendees: delegates
withType: @"calendar:invitation"];
[self sendReceiptEmailUsingTemplateNamed: @"Invitation"
forObject: event to: delegates];
}
@ -1335,9 +1341,10 @@
[self _handleRemovedUsers: attendees
withRecurrenceId: recurrenceId];
[self sendEMailUsingTemplateNamed: @"Deletion"
forObject: [occurence itipEntryWithMethod: @"cancel"]
previousObject: nil
toAttendees: attendees];
forObject: [occurence itipEntryWithMethod: @"cancel"]
previousObject: nil
toAttendees: attendees
withType: @"calendar:cancellation"];
[self sendReceiptEmailUsingTemplateNamed: @"Deletion"
forObject: occurence
to: attendees];
@ -1667,9 +1674,10 @@
}
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [event itipEntryWithMethod: @"request"]
previousObject: nil
toAttendees: attendees];
forObject: [event itipEntryWithMethod: @"request"]
previousObject: nil
toAttendees: attendees
withType: @"calendar:invitation"];
[self sendReceiptEmailUsingTemplateNamed: @"Invitation"
forObject: event to: attendees];
}

View file

@ -67,7 +67,8 @@
- (void) sendEMailUsingTemplateNamed: (NSString *) pageName
forObject: (iCalRepeatableEntityObject *) object
previousObject: (iCalRepeatableEntityObject *) previousObject
toAttendees: (NSArray *) attendees;
toAttendees: (NSArray *) attendees
withType: (NSString *) msgType;
- (void) sendIMIPReplyForEvent: (iCalRepeatableEntityObject *) event
from: (SOGoUser *) from
to: (iCalPerson *) recipient;

View file

@ -749,6 +749,7 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence,
forObject: (iCalRepeatableEntityObject *) object
previousObject: (iCalRepeatableEntityObject *) previousObject
toAttendees: (NSArray *) attendees
withType: (NSString *) msgType
{
NSString *pageName;
NSString *senderEmail, *shortSenderEmail, *email;
@ -844,6 +845,8 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence,
mailDate = [[NSCalendarDate date] rfc822DateString];
[headerMap setObject: mailDate forKey: @"date"];
[headerMap setObject: subject forKey: @"subject"];
if ([msgType length] > 0)
[headerMap setObject: msgType forKey: @"x-sogo-message-type"];
msg = [NGMimeMessage messageWithHeader: headerMap];
/* multipart body */
@ -925,6 +928,7 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence,
forKey: @"subject"];
[headerMap setObject: @"1.0" forKey: @"MIME-Version"];
[headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
[headerMap setObject: @"calendar:invitation-reply" forKey: @"x-sogo-message-type"];
msg = [NGMimeMessage messageWithHeader: headerMap];
/* multipart body */