From c05b331ac02520c294443bbb2ceda5e69b1667d0 Mon Sep 17 00:00:00 2001 From: smizrahi Date: Tue, 17 Dec 2024 16:35:52 +0100 Subject: [PATCH] fix(calendar): Fix SOGoDAVCalendarStartTimeLimit parameter. Events are retrieved when initial sync is done. --- SoObjects/Appointments/SOGoAppointmentFolder.m | 2 +- SoObjects/SOGo/SOGoGCSFolder.m | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 5cb6f3281..e8b7997b9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1760,7 +1760,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { NSCalendarDate *now, *rc; - if (davCalendarStartTimeLimit > 0 && ![[context activeUser] isSuperUser]) + if ([[context request] isSoWebDAVRequest] && davCalendarStartTimeLimit > 0 && ![[context activeUser] isSuperUser]) { now = [NSCalendarDate date]; rc = [now addTimeInterval: -davTimeLimitSeconds]; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 58a958de8..19f114691 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -1531,6 +1531,11 @@ static NSArray *childRecordFields = nil; return valid; } +- (NSCalendarDate *) _getMaxStartDate +{ + return nil; +} + /** DAV:sync-collection Report https://datatracker.ietf.org/doc/html/rfc6578#section-3.2 @@ -1559,9 +1564,10 @@ static NSArray *childRecordFields = nil; propElement = [(NGDOMNodeWithChildren *) documentElement firstElementWithTag: @"prop" inNamespace: XMLNS_WEBDAV]; properties = [self parseDAVRequestedProperties: propElement]; + records = [self syncTokenFieldsWithProperties: properties matchingSyncToken: syncToken - fromDate: nil + fromDate: [self _getMaxStartDate] initialLoad: NO]; [self _appendComponentProperties: [properties allKeys]