mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(calendar): put valarm at the end of vevent block to satisfy outlook.office.com which is too lazy to follow the spec
This commit is contained in:
@@ -355,12 +355,12 @@ NSNumber *iCalDistantFutureNumber = nil;
|
||||
if ([o isKindOfClass: [NSArray class]])
|
||||
[self _setAttendees: o];
|
||||
|
||||
o = [data objectForKey: @"alarm"];
|
||||
if ([o isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
owner = [data objectForKey: @"owner"];
|
||||
[self _setAlarm: o forOwner: owner];
|
||||
}
|
||||
// o = [data objectForKey: @"alarm"];
|
||||
// if ([o isKindOfClass: [NSDictionary class]])
|
||||
// {
|
||||
// owner = [data objectForKey: @"owner"];
|
||||
// [self _setAlarm: o forOwner: owner];
|
||||
// }
|
||||
|
||||
// Other attributes depend on the client object and therefore are set in [UIxComponentEditor setAttributes:]:
|
||||
// - organizer & "created-by"
|
||||
|
||||
@@ -372,6 +372,7 @@
|
||||
{
|
||||
NSCalendarDate *aptStartDate, *aptEndDate, *allDayStartDate;
|
||||
NSInteger offset, nbrDays;
|
||||
NSString *owner;
|
||||
NSTimeZone *timeZone;
|
||||
iCalDateTime *startDate;
|
||||
iCalTimeZone *tz;
|
||||
@@ -454,6 +455,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//To make an ics conforme with outlook live (bouh), valarm must be the last element of vevent
|
||||
//Try to set it here
|
||||
o = [data objectForKey: @"alarm"];
|
||||
if ([o isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
owner = [data objectForKey: @"owner"];
|
||||
[self _setAlarm: o forOwner: owner];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (iCalTimeZone *) adjustInContext: (WOContext *) context
|
||||
|
||||
Reference in New Issue
Block a user