mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-08 06:48:51 +00:00
Monotone-Parent: 0e4fe01f65e6836cefb46fca4a1cc35a759e63c2
Monotone-Revision: 348d7cfde7b84e4f271c58cd0b418303e0e045d1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-17T21:03:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -349,33 +349,35 @@
|
||||
participants = nil;
|
||||
state = nil;
|
||||
if ([[oldEvent objectAtIndex: 9] length] > 0 &&
|
||||
[[oldEvent objectAtIndex: 10] length] > 0) {
|
||||
participants = [[oldEvent objectAtIndex: 9] componentsSeparatedByString: @"\n"];
|
||||
states = [[oldEvent objectAtIndex: 10] componentsSeparatedByString: @"\n"];
|
||||
for (i = 0; i < [participants count]; i++) {
|
||||
user = [SOGoUser userWithLogin: [oldEvent objectAtIndex: 11] roles: nil];
|
||||
participant = [participants objectAtIndex: i];
|
||||
if ([user hasEmail: participant]) {
|
||||
switch ([[states objectAtIndex: i] intValue]) {
|
||||
case iCalPersonPartStatNeedsAction:
|
||||
state = @"needs-action";
|
||||
break;
|
||||
case iCalPersonPartStatAccepted:
|
||||
state = @"accepted";
|
||||
break;
|
||||
case iCalPersonPartStatDeclined:
|
||||
state = @"declined";
|
||||
break;
|
||||
[[oldEvent objectAtIndex: 10] length] > 0)
|
||||
{
|
||||
participants = [[oldEvent objectAtIndex: 9] componentsSeparatedByString: @"\n"];
|
||||
states = [[oldEvent objectAtIndex: 10] componentsSeparatedByString: @"\n"];
|
||||
for (i = 0; i < [participants count]; i++)
|
||||
{
|
||||
user = [SOGoUser userWithLogin: [oldEvent objectAtIndex: 11] roles: nil];
|
||||
participant = [participants objectAtIndex: i];
|
||||
if ([user hasEmail: participant]) {
|
||||
switch ([[states objectAtIndex: i] intValue]) {
|
||||
case iCalPersonPartStatNeedsAction:
|
||||
state = @"needs-action";
|
||||
break;
|
||||
case iCalPersonPartStatAccepted:
|
||||
state = @"accepted";
|
||||
break;
|
||||
case iCalPersonPartStatDeclined:
|
||||
state = @"declined";
|
||||
break;
|
||||
}
|
||||
[newEvent replaceObjectAtIndex: 9 withObject: state];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[newEvent replaceObjectAtIndex: 9 withObject: state];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (participants == nil || i == [participants count])
|
||||
[newEvent replaceObjectAtIndex: 9 withObject: @""];
|
||||
[newEvent removeObjectAtIndex: 10];
|
||||
[newEvent removeObjectAtIndex: 11];
|
||||
[newEvent removeObjectAtIndex: 10];
|
||||
|
||||
[newEvents addObject: newEvent];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user