emersion / go-webdav

A Go library for WebDAV, CalDAV and CardDAV
MIT License
314 stars 66 forks source link

carddav: PROPPATCH support for address books #147

Open bitfehler opened 7 months ago

bitfehler commented 7 months ago

The groundwork for address objects is also there, but it's not fully implemented.

I'll be honest: none of the usual suspects (DavX5, TB/CardBook, Evolution) actually use this, but that just makes me mad. They all rename address books client side only (or not at all). However, since PROPPATCH is a standard WebDAV operation, I successfully renamed my address books on the server using cadaver. I still think this is worth implementing, because if any sane client ever comes along, they might really want to use this.

Regarding the support for address objects, it might be worth taking a closer look at the worthwhileness before going through with it. I suspect that again no major client actually uses it, and for address objects it's also slightly less useful (because e.g. the "displayname" property is likely not used, because a contact is displayed by its name, etc.).

emersion commented 6 months ago

Does it help clients to advertise PROPPATCH here? https://github.com/emersion/go-webdav/blob/25f1014ef25f32967c8e17da16fba6f5c78886c0/carddav/server.go#L281

bitfehler commented 6 months ago

Does it help clients to advertise PROPPATCH here?

Good call, but no. I tried, and it doesn't change anything. For DavX5, there isn't even an option to change it, which seems to be a known issue, and e.g. CardBook never does an OPTIONS request anyways. Evolution does do one, but still doesn't bother ¯\_(ツ)_/¯

emersion commented 6 months ago

Good call, but no. I tried, and it doesn't change anything.

OK, too bad.

Can we still advertise PROPPATCH for address books?

bitfehler commented 5 months ago

Changed the interface so that the backend can implement UpdateAddressbook atomically, also simplified some things a bit.