mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-22 01:51:19 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user