Added the attendee to the parent's item attendees list
Monotone-Parent: bac00846545ecbaa355017083f8a425f751077c7 Monotone-Revision: d0d94f5dbbc0725b57437eef5366686ec0842d97 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2008-12-19T19:49:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
e7f3926468
commit
7458bf8e37
|
@ -783,15 +783,41 @@
|
||||||
else
|
else
|
||||||
hasChanged = NO;
|
hasChanged = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (recurrenceId)
|
else if (recurrenceId)
|
||||||
{
|
{
|
||||||
// We must add a recurrence to a non-existing event -- simply retrieve
|
NSArray *attendees;
|
||||||
|
unsigned int i;
|
||||||
|
BOOL found;
|
||||||
|
|
||||||
|
// We must add an occurence to a non-existing event -- simply retrieve
|
||||||
// the event from the organizer's calendar
|
// the event from the organizer's calendar
|
||||||
if (ownerEventObject == nil)
|
if (ownerEventObject == nil)
|
||||||
ownerEventObject = [self _lookupEvent: [newEvent uid] forUID: ownerUID];
|
ownerEventObject = [self _lookupEvent: [newEvent uid] forUID: ownerUID];
|
||||||
|
|
||||||
newEvent = [ownerEventObject component: NO secure: NO];
|
newEvent = [ownerEventObject component: NO secure: NO];
|
||||||
|
attendees = [newEvent attendees];
|
||||||
|
found = NO;
|
||||||
|
|
||||||
|
// We check if the attendee that was added to a single occurence is
|
||||||
|
// present in the master component. If not, we add it with a participation
|
||||||
|
// status set to "DECLINED"
|
||||||
|
for (i = 0; i < [attendees count]; i++)
|
||||||
|
{
|
||||||
|
if ([[attendees objectAtIndex: i] hasSameEmailAddress: person])
|
||||||
|
{
|
||||||
|
found = YES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
[person setParticipationStatus: iCalPersonPartStatDeclined];
|
||||||
|
[person setRsvp: @"TRUE"];
|
||||||
|
[person setRole: @"REQ-PARTICIPANT"];
|
||||||
|
[newEvent addToAttendees: person];
|
||||||
|
[ownerEventObject saveContentString: [[newEvent parent] versitString]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We generate the updated iCalendar file and we save it
|
// We generate the updated iCalendar file and we save it
|
||||||
|
|
Loading…
Reference in a new issue