fix(caldav): expand recurring events in range (#55)

The iCal parser returned master VEVENT components with their
original start dates instead of expanding recurrences. Events
from months ago appeared in today's feed.

parseICalEvents now accepts an optional timeRange. When set,
recurring events are expanded via ical.js iterator and only
occurrences overlapping the range are returned. Exception
overrides (RECURRENCE-ID) are applied during expansion.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-04 23:17:14 +00:00
committed by GitHub
parent de29e44a08
commit 31d5aa8d50
9 changed files with 359 additions and 14 deletions

View File

@@ -184,7 +184,7 @@ export class CalDavSource implements FeedSource<CalDavFeedItem> {
for (const obj of objects) {
if (typeof obj.data !== "string") continue
const events = parseICalEvents(obj.data, calendarName)
const events = parseICalEvents(obj.data, calendarName, { start, end })
for (const event of events) {
allEvents.push(event)
}