From 08155ead7bf80308b4cb67063cc91e3e3679ce16 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Sat, 22 Aug 2026 14:04:17 -0400 Subject: pim: a caldav backend, and a partstat that refuses to lie caldav/fs is the second backend, and it cost ~330 lines: discovery, a report for the window, ETags to decide whether anything moved. The event model, recurrence expansion, the tree, ctl, query, alarm and changed all came from lib/cal untouched, which is what the split was for. go-webdav hands back *ical.Calendar from the same library lib/cal parses with, so FromCalendars takes it straight in. Two interfaces, both optional. Identity says whose calendar this is, because in iTIP your identity is the mailto: in your own ATTENDEE line and nothing else can tell which attendee is you. RSVPer says the backend can answer an invitation -- meaning both halves of it, updating your copy and telling the organiser. A backend that can only do one should not implement it, so partstat is 0444 on a published .ics and writing to it fails rather than half-working. Two bugs worth naming. go-webdav resolves paths with path.Join, which drops a trailing slash: pointed at /dav/ it asks about /dav, and Cyrus answers 405 for that spelling and 207 for the other, so the first PROPFIND is done by hand. And an absolute DAV href replaces the endpoint's path rather than extending it; appending gave /dav/dav/calendars/..., a 404, and a probe reading 404 as "no" hid calendar-auto-schedule, which fastmail does in fact offer. pimup brings mail and the calendars up and mounts them; riostart runs it before opening any window, since a mount only exists in the namespace that made it. rio does not run riostart by itself: it is the argument to -i. Co-Authored-By: Claude Opus 5 --- pim/go.mod | 1 + 1 file changed, 1 insertion(+) (limited to 'pim/go.mod') diff --git a/pim/go.mod b/pim/go.mod index 242ba7b..7a24a64 100644 --- a/pim/go.mod +++ b/pim/go.mod @@ -11,6 +11,7 @@ require ( github.com/Plan9-Archive/libauth v0.0.0-20180917063427-d1ca9e94969d // indirect github.com/emersion/go-ical v0.0.0-20250609112844-439c63cef608 // indirect github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21 // indirect + github.com/emersion/go-webdav v0.7.0 // indirect github.com/fhs/mux9p v0.3.1 // indirect github.com/knusbaum/go9p v1.18.0 // indirect github.com/teambition/rrule-go v1.8.2 // indirect -- cgit v1.2.3