From 5aca2d7235f60c093ab42e205df64eb8fdf71f06 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 28 Nov 2008 23:10:41 +0000 Subject: [PATCH] Monotone-Parent: fd17d1db3508a9f1ae745c58c00d732b0459740e Monotone-Revision: 8ea29fd9dc80aa205927a1c157c06ee3d46c96d1 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-11-28T23:10:41 Monotone-Branch: ca.inverse.sogo --- .../Appointments/SOGoAppointmentObject.m | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 7ea436021..478e90b10 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -325,12 +325,35 @@ fromOldEvent: oldEvent]; } else - [self _requireResponseFromAttendees: attendees]; + { + // Set new attendees status to "needs action" + [self _requireResponseFromAttendees: attendees]; + + // If other attributes have changed, update the event + // in each attendee's calendar + if ([[changes updatedProperties] count]) + { + NSEnumerator *enumerator; + iCalPerson *currentAttendee; + NSString *currentUID; + + enumerator = [[newEvent attendees] objectEnumerator]; + while ((currentAttendee = [enumerator nextObject])) + { + currentUID = [currentAttendee uid]; + if (currentUID) + [self _addOrUpdateEvent: newEvent + forUID: currentUID + owner: owner]; + } + } + } if ([attendees count]) { + // Send an invitation to new attendees [self _handleAddedUsers: attendees fromEvent: newEvent]; - [self sendEMailUsingTemplateNamed: @"Update" + [self sendEMailUsingTemplateNamed: @"Invitation" forObject: [newEvent itipEntryWithMethod: @"request"] previousObject: oldEvent toAttendees: attendees];