fix(calendar): Avoid event duplication when adding an ics with an older sequence number and event already added in calendar

This commit is contained in:
smizrahi
2023-08-14 17:18:37 +02:00
committed by Hivert Quentin
parent 2729cf81c5
commit e47566e3a9

View File

@@ -2312,6 +2312,9 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
}
}
// We check of the sequences are alright. We don't accept attendees
// This can happen when a user add on old ics after accepting a most recent one
if ([[newEvent sequence] intValue] >= [[oldEvent sequence] intValue]) {
// We check if the PUT call is actually an PART-STATE change
// from one of the attendees - here's the logic :
//
@@ -2506,6 +2509,10 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
ex = [self saveComponent: calendar
baseVersion: baseVersion];
}
return ex;
}
@@ -2611,6 +2618,8 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
ex = [self matchesRequestConditionInContext: context];
if (ex)
return ex;
}
if (mustUpdate)