From 9851c32a1e5d5d584b350a22605a12b800fa0634 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 17 Feb 2014 15:49:22 -0500 Subject: [PATCH] Fixed the handling of organizers --- ActiveSync/iCalEvent+ActiveSync.m | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ActiveSync/iCalEvent+ActiveSync.m b/ActiveSync/iCalEvent+ActiveSync.m index 3bfa99b9d..05f18a3ce 100644 --- a/ActiveSync/iCalEvent+ActiveSync.m +++ b/ActiveSync/iCalEvent+ActiveSync.m @@ -403,23 +403,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } // Organizer - we don't touch the value unless we're the organizer - if ([self userIsOrganizer: [context activeUser]]) + if ((o = [theValues objectForKey: @"Organizer_Email"]) && + ([self userIsOrganizer: [context activeUser]] || [[context activeUser] hasEmail: o])) { - if ((o = [theValues objectForKey: @"Organizer_Email"])) - { - iCalPerson *person; - - person = [iCalPerson elementWithTag: @"organizer"]; - [person setEmail: o]; - [person setCn: [theValues objectForKey: @"Organizer_Name"]]; - [person setPartStat: @"ACCEPTED"]; - [self setOrganizer: person]; - } + iCalPerson *person; + + person = [iCalPerson elementWithTag: @"organizer"]; + [person setEmail: o]; + [person setCn: [theValues objectForKey: @"Organizer_Name"]]; + [person setPartStat: @"ACCEPTED"]; + [self setOrganizer: person]; } // Attendees - we don't touch the values if we're an attendee. This is gonna // be done automatically by the ActiveSync client when invoking MeetingResponse. - if ([self userIsAttendee: [context activeUser]]) + if (![self userIsAttendee: [context activeUser]]) { if ((o = [theValues objectForKey: @"Attendees"])) {