mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-12 21:59:43 +00:00
Monotone-Parent: c33c456b52c6e6d4ee1f29bfd9ca57096b8d13be
Monotone-Revision: 5539e3c473023281dd04f7cb8a8fee051ac0735d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-11T19:08:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -121,6 +121,7 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
||||
// TODO: what does this do? lookup the home of the organizer?
|
||||
return [[self container] lookupHomeFolderForUID:_uid inContext:_ctx];
|
||||
}
|
||||
|
||||
- (NSArray *)lookupCalendarFoldersForUIDs:(NSArray *)_uids inContext:(id)_ctx {
|
||||
return [[self container] lookupCalendarFoldersForUIDs:_uids inContext:_ctx];
|
||||
}
|
||||
@@ -131,11 +132,8 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
||||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs: _uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject]) != nil) {
|
||||
NSException *error;
|
||||
@@ -173,18 +171,16 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
||||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs: _uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject])) {
|
||||
NSException *error;
|
||||
SOGoTaskObject *task;
|
||||
|
||||
task = [folder lookupName:[self nameInContainer] inContext:ctx
|
||||
acquire:NO];
|
||||
task = [folder lookupName: [self nameInContainer]
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
if (![task isNotNull]) {
|
||||
[self logWithFormat:@"Note: did not find '%@' in folder: %@",
|
||||
[self nameInContainer], folder];
|
||||
@@ -452,52 +448,6 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
||||
return [self saveContentString:_iCalString baseSequence:0];
|
||||
}
|
||||
|
||||
- (NSException *)changeParticipationStatus:(NSString *)_status
|
||||
inContext:(id)_ctx
|
||||
{
|
||||
iCalToDo *task;
|
||||
iCalPerson *p;
|
||||
NSString *newContent;
|
||||
NSException *ex;
|
||||
NSString *myEMail;
|
||||
|
||||
// TODO: do we need to use SOGoTask? (prefer iCalToDo?)
|
||||
task = (iCalToDo *) [self component: NO];
|
||||
|
||||
if (task == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"unable to parse task record"];
|
||||
}
|
||||
|
||||
myEMail = [[_ctx activeUser] email];
|
||||
if ((p = [task findParticipantWithEmail:myEMail]) == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"user does not participate in this "
|
||||
@"task"];
|
||||
}
|
||||
|
||||
[p setPartStat:_status];
|
||||
newContent = [[task parent] versitString];
|
||||
|
||||
// TODO: send iMIP reply mails?
|
||||
|
||||
// [task release]; task = nil;
|
||||
|
||||
if (newContent == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"Could not generate iCalendar data ..."];
|
||||
}
|
||||
|
||||
if ((ex = [self saveContentString:newContent]) != nil) {
|
||||
// TODO: why is the exception wrapped?
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:[ex reason]];
|
||||
}
|
||||
|
||||
return nil /* means: no error */;
|
||||
}
|
||||
|
||||
|
||||
/* message type */
|
||||
|
||||
- (NSString *)outlookMessageClass {
|
||||
|
||||
Reference in New Issue
Block a user