mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
See ChangeLog
Monotone-Parent: ac03f0324d16940145f9feb2cf56e61ed3ee5ef6 Monotone-Revision: 9aa24eb1e4a4107aaa9cf4e74e6f8c5b0477350a Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-11-10T16:18:57 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1494,35 +1494,38 @@ RANGE(2);
|
||||
|
||||
request = [context request];
|
||||
json = [request formValueForKey: @"attendees"];
|
||||
attendees = [NSArray array];
|
||||
jsonScanner = [NSScanner scannerWithString: json];
|
||||
if ([jsonScanner scanJSONObject: &attendeesData])
|
||||
if ([json length])
|
||||
{
|
||||
newAttendees = [NSMutableArray new];
|
||||
attendees = [attendeesData allValues];
|
||||
max = [attendees count];
|
||||
for (count = 0; count < max; count++)
|
||||
attendees = [NSArray array];
|
||||
jsonScanner = [NSScanner scannerWithString: json];
|
||||
if ([jsonScanner scanJSONObject: &attendeesData])
|
||||
{
|
||||
currentData = [attendees objectAtIndex: count];
|
||||
currentEmail = [currentData objectForKey: @"email"];
|
||||
currentAttendee = [component findParticipantWithEmail: currentEmail];
|
||||
if (!currentAttendee)
|
||||
newAttendees = [NSMutableArray new];
|
||||
attendees = [attendeesData allValues];
|
||||
max = [attendees count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
currentAttendee = [iCalPerson elementWithTag: @"attendee"];
|
||||
[currentAttendee setCn: [currentData objectForKey: @"name"]];
|
||||
[currentAttendee setEmail: currentEmail];
|
||||
[currentAttendee setRole: @"REQ-PARTICIPANT"];
|
||||
[currentAttendee setRsvp: @"TRUE"];
|
||||
[currentAttendee
|
||||
setParticipationStatus: iCalPersonPartStatNeedsAction];
|
||||
currentData = [attendees objectAtIndex: count];
|
||||
currentEmail = [currentData objectForKey: @"email"];
|
||||
currentAttendee = [component findParticipantWithEmail: currentEmail];
|
||||
if (!currentAttendee)
|
||||
{
|
||||
currentAttendee = [iCalPerson elementWithTag: @"attendee"];
|
||||
[currentAttendee setCn: [currentData objectForKey: @"name"]];
|
||||
[currentAttendee setEmail: currentEmail];
|
||||
[currentAttendee setRole: @"REQ-PARTICIPANT"];
|
||||
[currentAttendee setRsvp: @"TRUE"];
|
||||
[currentAttendee
|
||||
setParticipationStatus: iCalPersonPartStatNeedsAction];
|
||||
}
|
||||
[newAttendees addObject: currentAttendee];
|
||||
}
|
||||
[newAttendees addObject: currentAttendee];
|
||||
[component setAttendees: newAttendees];
|
||||
[newAttendees release];
|
||||
}
|
||||
[component setAttendees: newAttendees];
|
||||
[newAttendees release];
|
||||
else
|
||||
NSLog(@"Error scanning following JSON:\n%@", json);
|
||||
}
|
||||
else
|
||||
NSLog(@"Error scanning following JSON:\n%@", json);
|
||||
}
|
||||
|
||||
- (void) _handleOrganizer
|
||||
|
||||
Reference in New Issue
Block a user