mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-19 20:09:28 +00:00
See ChangeLog
Monotone-Parent: 04ba7fac2627906e1d9fb91e79b12769e1957a41 Monotone-Revision: 00ac31b5372de5deb01c919e39d6eacc4a512125 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-08-11T02:06:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -274,6 +274,13 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO : if [theEvent recurrenceId], only update this occurrence
|
||||
// in attendee's calendar
|
||||
|
||||
// TODO : when updating the master event, handle exception dates
|
||||
// in attendee's calendar (add exception dates and remove matching
|
||||
// occurrences) -- see _updateRecurrenceIDsWithEvent:
|
||||
|
||||
iCalString = [[theEvent parent] versitString];
|
||||
}
|
||||
|
||||
@@ -508,46 +515,44 @@
|
||||
// as the event's UID might get modified in SOGoCalendarComponent: -saveComponent:
|
||||
[super saveComponent: newEvent];
|
||||
|
||||
if ([newEvent userIsOrganizer: ownerUser])
|
||||
if ([self isNew])
|
||||
{
|
||||
if ([self isNew])
|
||||
// New event -- send invitation to all attendees
|
||||
attendees = [newEvent attendeesWithoutUser: ownerUser];
|
||||
if ([attendees count])
|
||||
{
|
||||
// New event -- send invitation to all attendees
|
||||
attendees = [newEvent attendeesWithoutUser: ownerUser];
|
||||
if ([attendees count])
|
||||
{
|
||||
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||
forObject: [newEvent itipEntryWithMethod: @"request"]
|
||||
previousObject: nil
|
||||
toAttendees: attendees];
|
||||
}
|
||||
|
||||
if (![[newEvent attendees] count])
|
||||
[[newEvent uniqueChildWithTag: @"organizer"] setValue: 0
|
||||
to: @""];
|
||||
[self _handleAddedUsers: attendees fromEvent: newEvent];
|
||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||
forObject: [newEvent itipEntryWithMethod: @"request"]
|
||||
previousObject: nil
|
||||
toAttendees: attendees];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Event is modified -- sent update status to all attendees
|
||||
// and modify their calendars.
|
||||
recurrenceId = [newEvent recurrenceId];
|
||||
if (recurrenceId == nil)
|
||||
oldEvent = [self component: NO secure: NO];
|
||||
else
|
||||
{
|
||||
// Event is modified -- sent update status to all attendees
|
||||
// and modify their calendars.
|
||||
recurrenceId = [newEvent recurrenceId];
|
||||
if (recurrenceId == nil)
|
||||
oldEvent = [self component: NO secure: NO];
|
||||
else
|
||||
{
|
||||
// If recurrenceId is defined, find the specified occurence
|
||||
// within the repeating vEvent.
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
||||
if (oldEvent == nil)
|
||||
// If no occurence found, create one
|
||||
oldEvent = (iCalEvent*)[self newOccurenceWithID: recurrenceTime];
|
||||
}
|
||||
// If recurrenceId is defined, find the specified occurence
|
||||
// within the repeating vEvent.
|
||||
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
|
||||
oldEvent = (iCalEvent*)[self lookupOccurence: recurrenceTime];
|
||||
if (oldEvent == nil)
|
||||
// If no occurence found, create one
|
||||
oldEvent = (iCalEvent*)[self newOccurenceWithID: recurrenceTime];
|
||||
}
|
||||
|
||||
if ([[[oldEvent parent] firstChildWithTag: @"vevent"] userIsOrganizer: ownerUser])
|
||||
{
|
||||
// The owner is the organizer of the event; handle the modifications
|
||||
|
||||
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
|
||||
|
||||
// The sequence has possibly been increased -- resave the event.
|
||||
// This will also take care of a decomposed group.
|
||||
[super saveComponent: newEvent];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user