Improved handling of notifications and participation change updates. Added comments to the code.

Monotone-Parent: 17e3e8707a2ae061fd0c4184a32cd23a97af96ba
Monotone-Revision: 6fac49c5eccc3f49ff214ee3fa7e0df6f166f18d

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2008-11-10T15:38:05
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2008-11-10 15:38:05 +00:00
parent 1b5c0ef81c
commit 312656117f
6 changed files with 167 additions and 39 deletions
@@ -1882,18 +1882,18 @@ static Class sogoAppointmentFolderKlass = Nil;
NSArray *elements;
NSString *method, *filename;
SOGoAppointmentObject *apt;
filename = [NSString stringWithFormat: @"%@.ics", [event uid]];
apt = [SOGoAppointmentObject objectWithName: filename
andContent: iCalString
inContainer: self];
method = [[event parent] method];
if ([method isEqualToString: @"REQUEST"])
elements = [apt postCalDAVEventRequestTo: recipients];
elements = [apt postCalDAVEventRequestTo: recipients from: originator];
else if ([method isEqualToString: @"REPLY"])
elements = [apt postCalDAVEventReplyTo: recipients];
elements = [apt postCalDAVEventReplyTo: recipients from: originator];
else if ([method isEqualToString: @"CANCEL"])
elements = [apt postCalDAVEventCancelTo: recipients];
elements = [apt postCalDAVEventCancelTo: recipients from: originator];
else
elements = nil;
@@ -1964,6 +1964,10 @@ static Class sogoAppointmentFolderKlass = Nil;
if ([cType hasPrefix: @"text/calendar"])
{
originator = [request headerForKey: @"originator"];
if ([[originator lowercaseString] hasPrefix: @"mailto:"])
originator = [originator substringFromIndex: 7];
recipients = [[request headerForKey: @"recipient"]
componentsSeparatedByString: @", "];
obj = [self caldavScheduleRequest: [request contentAsString]