mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-21 18:48:12 +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:
1 parent
828d3b2818
commit
e09ac2e383
32 files changed
+350
-616
No files matched your search
@@ -112,11 +112,8 @@
|
||||
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;
|
||||
@@ -125,7 +122,7 @@
|
||||
if (![folder isNotNull]) /* no folder was found for given UID */
|
||||
continue;
|
||||
|
||||
apt = [folder lookupName: [self nameInContainer] inContext:ctx
|
||||
apt = [folder lookupName: [self nameInContainer] inContext: context
|
||||
acquire: NO];
|
||||
if ([apt isKindOfClass: [NSException class]])
|
||||
{
|
||||
@@ -160,17 +157,14 @@
|
||||
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;
|
||||
SOGoAppointmentObject *apt;
|
||||
|
||||
apt = [folder lookupName:[self nameInContainer] inContext:ctx
|
||||
apt = [folder lookupName:[self nameInContainer] inContext: context
|
||||
acquire:NO];
|
||||
if ([apt isKindOfClass: [NSException class]]) {
|
||||
[self logWithFormat: @"%@", [(NSException *) apt reason]];
|
||||
@@ -428,57 +422,6 @@
|
||||
return [self saveContentString: _iCalString baseSequence: 0];
|
||||
}
|
||||
|
||||
- (NSException *) changeParticipationStatus: (NSString *) _status
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
iCalEvent *apt;
|
||||
iCalPerson *p;
|
||||
NSString *newContent;
|
||||
NSException *ex;
|
||||
NSString *myEMail;
|
||||
|
||||
ex = nil;
|
||||
|
||||
// TODO: do we need to use SOGoAppointment? (prefer iCalEvent?)
|
||||
apt = (iCalEvent *) [self component: NO];
|
||||
|
||||
if (apt)
|
||||
{
|
||||
myEMail = [[_ctx activeUser] email];
|
||||
p = [apt findParticipantWithEmail: myEMail];
|
||||
if (p)
|
||||
{
|
||||
// TODO: send iMIP reply mails?
|
||||
|
||||
[p setPartStat:_status];
|
||||
newContent = [[apt parent] versitString];
|
||||
if (newContent)
|
||||
{
|
||||
ex = [self saveContentString:newContent];
|
||||
if (ex)
|
||||
// TODO: why is the exception wrapped?
|
||||
/* Server Error */
|
||||
ex = [NSException exceptionWithHTTPStatus: 500
|
||||
reason: [ex reason]];
|
||||
}
|
||||
else
|
||||
ex
|
||||
= [NSException exceptionWithHTTPStatus: 500 /* Server Error */
|
||||
reason: @"Could not generate iCalendar data ..."];
|
||||
}
|
||||
else
|
||||
ex = [NSException exceptionWithHTTPStatus: 404 /* Not Found */
|
||||
reason: @"user does not participate in this "
|
||||
@"appointment"];
|
||||
}
|
||||
else
|
||||
ex = [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"unable to parse appointment record"];
|
||||
|
||||
return ex;
|
||||
}
|
||||
|
||||
|
||||
/* message type */
|
||||
|
||||
- (NSString *) outlookMessageClass
|
||||
|
||||
Reference in new issue
Block a user