diff --git a/ChangeLog b/ChangeLog index 9c25b6bcf..d24d4e055 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2012-02-23 Wolfgang Sourdeau + * 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 diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 487d2eca1..640ed92b4 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -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]; } diff --git a/SoObjects/Appointments/SOGoCalendarComponent.h b/SoObjects/Appointments/SOGoCalendarComponent.h index d08389f56..f3c341763 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.h +++ b/SoObjects/Appointments/SOGoCalendarComponent.h @@ -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; diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 3be18229c..0b3ed7907 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -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 */