From a84b55f36cd346b28f0eafd6d026f5e6c01f480c Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 6 Jun 2017 11:10:31 -0400 Subject: [PATCH] (fix) use the organizer's alarm by default when accepting IMIP messages (fixes #3934) --- NEWS | 3 +++ UI/MailPartViewers/UIxMailPartICalActions.m | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index a3993404c..299a327f6 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,9 @@ New features - [eas] initial EAS v16 and email drafts support +Bug fixes + - [web] use the organizer's alarm by default when accepting IMIP messages (#3934) + 2.3.21 (2017-06-01) ------------------- diff --git a/UI/MailPartViewers/UIxMailPartICalActions.m b/UI/MailPartViewers/UIxMailPartICalActions.m index 3bd57f3db..0d804b03d 100644 --- a/UI/MailPartViewers/UIxMailPartICalActions.m +++ b/UI/MailPartViewers/UIxMailPartICalActions.m @@ -240,21 +240,21 @@ - (WOResponse *) _changePartStatusAction: (NSString *) newStatus withDelegate: (iCalPerson *) delegate { - WOResponse *response; SOGoAppointmentObject *eventObject; iCalEvent *chosenEvent; - //NSException *ex; + WOResponse *response; + iCalAlarm *alarm; chosenEvent = [self _setupChosenEventAndEventObject: &eventObject]; if (chosenEvent) { + // For invitations, we take the organizers's alarm to start with + alarm = [[chosenEvent alarms] lastObject]; response = (WOResponse*)[eventObject changeParticipationStatus: newStatus withDelegate: delegate - alarm: nil + alarm: alarm forRecurrenceId: [chosenEvent recurrenceId]]; -// if (ex) -// response = ex; //[self responseWithStatus: 500]; -// else + if (!response) response = [self responseWith204]; }