Skip to content

Scheduling infrastructure for absolutely everyone.

Fetch only CalDAV calendars via TSDav (#1727)

Bailey Pumfleetce3947ac4cb8
diff --git a/lib/integrations/calendar/services/BaseCalendarService.ts b/lib/integrations/calendar/services/BaseCalendarService.ts
index 11a3292b454..56b289d9f80 100644
--- a/lib/integrations/calendar/services/BaseCalendarService.ts
+++ b/lib/integrations/calendar/services/BaseCalendarService.ts
@@ -191,19 +191,21 @@ export default abstract class BaseCalendarService implements Calendar {
): Promise<EventBusyDate[]> {
const objects = (
await Promise.all(
- selectedCalendars.map((sc) =>
- fetchCalendarObjects({
- calendar: {
- url: sc.externalId,
- },
- headers: this.headers,
- expand: true,
- timeRange: {
- start: new Date(dateFrom).toISOString(),
- end: new Date(dateTo).toISOString(),
- },
- })
- )
+ selectedCalendars
+ .filter((sc) => sc.integration === "caldav_calendar")
+ .map((sc) =>
+ fetchCalendarObjects({
+ calendar: {
+ url: sc.externalId,
+ },
+ headers: this.headers,
+ expand: true,
+ timeRange: {
+ start: new Date(dateFrom).toISOString(),
+ end: new Date(dateTo).toISOString(),
+ },
+ })
+ )
)
).flat();