Monotone-Parent: 1b807c65d09c64e8b6e6a775dbaaad3db3150dd6
Monotone-Revision: c16aa62954764e28a982189ae9222645f4705921 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-02T21:20:02 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
1a4d064d11
commit
5ca67f5b8e
|
@ -7,7 +7,8 @@
|
|||
events based on the value of PidLidAppointmentSubType.
|
||||
Don't add the timezone component to the vCalendar in that case.
|
||||
Take PidLidAppointmentStateFlags into account before building the
|
||||
list of attendees.
|
||||
list of attendees. Take the organizer passed in the recipients
|
||||
into account when specified.
|
||||
|
||||
2011-11-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
|
|
|
@ -842,33 +842,37 @@
|
|||
for (i = 0; i < [recipients count]; i++)
|
||||
{
|
||||
dict = [recipients objectAtIndex: i];
|
||||
attEmail = [dict objectForKey: @"email"];
|
||||
|
||||
/* Work-around: it happens that Outlook still passes the
|
||||
organizer as a recipient, maybe because of a feature
|
||||
documented in a pre-mesozoic PDF still buried in a cavern...
|
||||
In that case we remove it, and we keep the number of
|
||||
effective recipients in "effective". If the total is 0, we
|
||||
remove the "ORGANIZER" too. */
|
||||
if ([attEmail isEqualToString: orgEmail])
|
||||
continue;
|
||||
|
||||
effective++;
|
||||
flags = [dict objectForKey: MAPIPropertyKey (PR_RECIPIENT_FLAGS)];
|
||||
if (!flags)
|
||||
{
|
||||
[self logWithFormat: @"no recipient flags specified"];
|
||||
break;
|
||||
[self logWithFormat:
|
||||
@"no recipient flags specified: skipping recipient"];
|
||||
continue;
|
||||
}
|
||||
|
||||
person = [iCalPerson new];
|
||||
[person setCn: [dict objectForKey: @"fullName"]];
|
||||
attEmail = [dict objectForKey: @"email"];
|
||||
[person setEmail: attEmail];
|
||||
|
||||
if (([flags unsignedIntValue] & 0x0002)) /* recipOrganizer */
|
||||
[newEvent setOrganizer: person];
|
||||
else
|
||||
{
|
||||
/* Work-around: it happens that Outlook still passes the
|
||||
organizer as a recipient, maybe because of a feature
|
||||
documented in a pre-mesozoic PDF still buried in a
|
||||
cavern... In that case we remove it, and we keep the
|
||||
number of effective recipients in "effective". If the
|
||||
total is 0, we remove the "ORGANIZER" too. */
|
||||
if ([attEmail isEqualToString: orgEmail])
|
||||
{
|
||||
[self logWithFormat:
|
||||
@"avoiding setting organizer as recipient"];
|
||||
continue;
|
||||
}
|
||||
|
||||
trackStatus
|
||||
= [dict
|
||||
objectForKey: MAPIPropertyKey (PR_RECIPIENT_TRACKSTATUS)];
|
||||
|
@ -894,13 +898,14 @@
|
|||
[person setRsvp: @"TRUE"];
|
||||
[person setRole: @"REQ-PARTICIPANT"];
|
||||
[newEvent addToAttendees: person];
|
||||
effective++;
|
||||
}
|
||||
|
||||
if (effective == 0) /* See work-around above */
|
||||
[newEvent setOrganizer: nil];
|
||||
|
||||
[person release];
|
||||
}
|
||||
|
||||
if (effective == 0) /* See work-around above */
|
||||
[newEvent setOrganizer: nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue