diff --git a/NEWS b/NEWS index 3abc862b0..42cc196d5 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ Bug fixes - fixed regression when attaching files to a reply - wait 20 seconds (instead of 2) before deleting temporary download forms (#2811) - avoid raising exceptions when the db is down and we try to access the preferences module (#2813) + - we now ignore the SCHEDULE-AGENT property when Thunderbird/Ligthning sends it to avoid + not-generating invitation responses for externally received IMIP messages 2.2.5 (2014-06-05) ------------------ diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 1712ec7ea..0e397928f 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -1428,9 +1428,11 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent // - (BOOL) _shouldScheduleEvent: (iCalPerson *) theOrganizer { + NSArray *userAgents; NSString *v; BOOL b; - + int i; + b = YES; if (theOrganizer && (v = [theOrganizer value: 0 ofAttribute: @"SCHEDULE-AGENT"])) @@ -1440,6 +1442,27 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent b = NO; } + // + // If we have to deal with Thunderbird/Lightning, we always send invitation + // reponses, as Lightning v2.6 (at least this version) sets SCHEDULE-AGENT + // to NONE/CLIENT when responding to an external invitation received by + // SOGo - so no invitation responses are ever sent by Lightning. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=865726 and + // https://bugzilla.mozilla.org/show_bug.cgi?id=997784 + // + userAgents = [[context request] headersForKey: @"User-Agent"]; + + for (i = 0; i < [userAgents count]; i++) + { + if ([[userAgents objectAtIndex: i] rangeOfString: @"Thunderbird"].location != NSNotFound && + [[userAgents objectAtIndex: i] rangeOfString: @"Lightning"].location != NSNotFound) + { + b = YES; + break; + } + } + + return b; }