bridges: resolve Nextcloud tasks to VTODO-capable lists
Task operations used the same calendar resolver as events, so a request that named (or defaulted to) an event-only calendar like "personal" put a VTODO into a collection that rejects it. Read each collection's CalDAV supported-calendar-component-set, expose it as `components` on /calendars, and add GET /tasklists (VTODO-capable calendars, minus Nextcloud Deck boards). _resolve_calendar is now component-aware: task routes only target a VTODO-capable list and reject an event-only calendar with a clear 400; with no name they try default_task_calendar, then default_calendar when it also accepts VTODO, then the sole user task list. Add the default_task_calendar config (top-level nextcloud_default_task_calendar fallback) and document the routes in the bridge catalog.
This commit is contained in:
1 parent
228886f7cd
commit
0005d8f7ee
6 files changed
+231
-20
No files matched your search
@@ -1314,9 +1314,11 @@ CLI, unit tests (24) + integration tests (2).
|
||||
`nextcloud_bridge_token`); the `BridgeInfo` declares only those two config vars.
|
||||
Routes (reads `GET`, mutations `POST`): files (`/files`, `/files/stat`,
|
||||
`/files/read` text-or-base64, `/files/search`, `/files/write|mkdir|delete|move|copy`),
|
||||
calendars (`/calendars`, `/calendars/events` list, `POST /calendars/events` +
|
||||
`/update` + `/delete`), tasks (`/tasks` list, `POST /tasks` + `/update` +
|
||||
`/complete` + `/delete`), contacts (`/addressbooks`, `/contacts` list/search,
|
||||
calendars (`/calendars` with each collection's `supported-calendar-component-set`
|
||||
as `components`, `/tasklists` for VTODO-capable task lists, `/calendars/events`
|
||||
list, `POST /calendars/events` + `/update` + `/delete`), tasks (`/tasks` list,
|
||||
`POST /tasks` + `/update` + `/complete` + `/delete`; task routes only target a
|
||||
VTODO-capable calendar and reject an event-only one), contacts (`/addressbooks`, `/contacts` list/search,
|
||||
`POST /contacts` + `/update` + `/delete`), notes (`/notes`, `/notes/get`,
|
||||
`POST /notes` + `/update` + `/delete`), and `/user` + `/capabilities` (OCS).
|
||||
A missing connection is `503`; a real failure (`NextcloudError` — transport,
|
||||
|
||||
Reference in new issue
Block a user