From 486a5285db8696e2b4037e5a34fd617ba9be042f Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Fri, 3 Jun 2022 09:45:27 +0200 Subject: [PATCH] Add filtering of CalDAV query results Currently, `QueryCalendarObjects()` simply returns all objects. Now that `caldav.Filter()` is available upstream, use it to actually filter out events that do not match the query. --- storage/filesystem.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/storage/filesystem.go b/storage/filesystem.go index ce9f00b..0d9f09d 100644 --- a/storage/filesystem.go +++ b/storage/filesystem.go @@ -582,9 +582,7 @@ func (b *filesystemBackend) QueryCalendarObjects(ctx context.Context, query *cal return result, err } - return result, nil - // TODO implement: - //return caldav.Filter(query, result) + return caldav.Filter(query, result) } func (b *filesystemBackend) PutCalendarObject(ctx context.Context, objPath string, calendar *ical.Calendar, opts *caldav.PutCalendarObjectOptions) (loc string, err error) {