summaryrefslogtreecommitdiff
path: root/pim/cmd/caldavfs
AgeCommit message (Collapse)Author
10 hourspim: answer an invitation by writing to a fileCalvin Morrison
echo ACCEPTED >events/uuid/<uid>/partstat now does it, on a backend that can. caldav/fs fetches the object, rewrites only our own ATTENDEE line and PUTs it back with If-Match; fastmail advertises calendar-auto-schedule, so that single PUT both updates the copy and sends the iMIP to the organiser. caps says read rsvp schedule and means all three. Two things that cost an hour between them. go-webdav strips the quotes off an ETag when it parses the header, but If-Match wants an entity-tag: a bare hex string gets 412, which reads exactly like losing a race to another client. And the tree kept serving the old answer right after a successful write, because RSVP resynced the backend without rebuilding anything; a file that lies immediately after you wrote it is worse than one that is slow. -R uid:PARTSTAT answers one invitation without serving, which is what a pim/rsvp wrapper wants to call. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
10 hourspim: a caldav backend, and a partstat that refuses to lieCalvin Morrison
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 <noreply@anthropic.com>