mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
fix(calendar): Fix duplicates in series appointments for Apple's Calendar
This commit is contained in:
@@ -124,8 +124,10 @@
|
||||
if(!IS_EQUAL([_from created], [_to created], isEqualToDate:))
|
||||
[updatedProperties addObject:@"created"];
|
||||
if(!IS_EQUAL([_from lastModified], [_to lastModified], isEqualToDate:))
|
||||
[updatedProperties addObject:@"lastModified"];
|
||||
if(![_from durationAsTimeInterval] == [_to durationAsTimeInterval])
|
||||
[updatedProperties addObject:@"timeStampAsDate"];
|
||||
if(!IS_EQUAL([_from timeStampAsDate], [_to timeStampAsDate], isEqualToDate:))
|
||||
[updatedProperties addObject:@"timeStampAsDate"];
|
||||
if([_from durationAsTimeInterval] != [_to durationAsTimeInterval])
|
||||
[updatedProperties addObject:@"duration"];
|
||||
if(!IS_EQUAL([_from summary], [_to summary], isEqualToString:))
|
||||
[updatedProperties addObject:@"summary"];
|
||||
@@ -145,6 +147,8 @@
|
||||
[updatedProperties addObject:@"organizer"];
|
||||
if(!IS_EQUAL([_from recurrenceRules], [_to recurrenceRules], isEqual:))
|
||||
[updatedProperties addObject:@"rrule"];
|
||||
if(!IS_EQUAL([_from recurrenceId], [_to recurrenceId], isEqualToDate:))
|
||||
[updatedProperties addObject:@"rid"];
|
||||
if(!IS_EQUAL([_from exceptionRules], [_to exceptionRules], isEqual:))
|
||||
[updatedProperties addObject:@"exrule"];
|
||||
if(!IS_EQUAL([_from exceptionDates], [_to exceptionDates], isEqual:))
|
||||
|
||||
@@ -191,11 +191,13 @@
|
||||
iCalCalendar *iCalendarToSave;
|
||||
iCalPerson *attendee;
|
||||
SOGoUser *user;
|
||||
WORequest *rq;
|
||||
|
||||
iCalendarToSave = nil;
|
||||
user = [SOGoUser userWithLogin: theUID];
|
||||
attendeeObject = [self _lookupEvent: [newEvent uid] forUID: theUID];
|
||||
attendee = [newEvent userAsAttendee: user];
|
||||
rq = [context request];
|
||||
|
||||
// If the atttende's role is NON-PARTICIPANT, we write nothing to its calendar
|
||||
if ([[attendee role] caseInsensitiveCompare: @"NON-PARTICIPANT"] == NSOrderedSame)
|
||||
@@ -217,8 +219,9 @@
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ([newEvent recurrenceId])
|
||||
|
||||
|
||||
if ([newEvent recurrenceId] && ![rq isICal4] && ![rq isICal])
|
||||
{
|
||||
// We must add an occurence to a non-existing event.
|
||||
if ([attendeeObject isNew])
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
static NSString *properties[] = {@"organizer", @"startDate", @"endDate",
|
||||
@"due", @"duration", @"summary",
|
||||
@"rdate", @"rrule", @"exdate", @"exrule",
|
||||
@"status", @"location",
|
||||
@"status", @"location", @"rid", @"timeStampAsDate",
|
||||
nil};
|
||||
NSString **currentProperty;
|
||||
BOOL updateRequired;
|
||||
|
||||
Reference in New Issue
Block a user