From d9949f42d5c0b02e1a474cab44447034fafc950f Mon Sep 17 00:00:00 2001 From: mARTin Date: Sun, 8 Mar 2026 01:35:19 +0100 Subject: [PATCH] fix: add VTODO filter for Synology CalDAV sync and clean up debug logs Synology tasks were not syncing because tsdav defaulted to VEVENT only. Added explicit VTODO comp-filter to the CalDAV REPORT request. Removed debug logging from sync routes. v1.15.9 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/lib/synology-tasks.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d160429..c2ec6be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.15.8", + "version": "1.15.9", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/lib/synology-tasks.ts b/src/lib/synology-tasks.ts index 6a660e2..8f4deca 100644 --- a/src/lib/synology-tasks.ts +++ b/src/lib/synology-tasks.ts @@ -125,13 +125,22 @@ export const fetchSynologyTasks = async (serverUrl: string, username: string, pa throw new Error(`List not found: ${listId}`); } + // Use VTODO filter to ensure we get tasks, not just events const objects = await client.fetchCalendarObjects({ calendar: targetCalendar, + filters: [{ + 'comp-filter': { + _attributes: { name: 'VCALENDAR' }, + 'comp-filter': { + _attributes: { name: 'VTODO' }, + }, + }, + }], }); const parsedTasks: any[] = []; - objects.forEach(obj => { + objects.forEach((obj) => { const data = (obj as any).data; if (!data) return;