feat(carddav): fix issue where only personal contacts can be synced on macOS (#1981). When , append the addressbook name as a username suffix to force macOS to treat each book as a distinct account. Usernames must not contain . Install via the provisioning profile. Closes #6033.

This commit is contained in:
smizrahi
2026-05-11 14:21:35 +02:00
committed by Hivert Quentin
parent f11f34cdef
commit 17cd008223
13 changed files with 136 additions and 9 deletions
+4 -1
View File
@@ -1257,7 +1257,10 @@
davCurrentUserPrincipal = nil;
else
{
s = [NSString stringWithFormat: @"/SOGo/dav/%@", login];
/* loginAlias preserves the <user>!<book> alias used by the
per-addressbook CardDAV profile, so that macOS Contacts keeps
using the alias URL instead of falling back on the canonical one. */
s = [NSString stringWithFormat: @"/SOGo/dav/%@", [activeUser loginAlias]];
userHREF = davElementWithContent (@"href", XMLNS_WEBDAV, s);
davCurrentUserPrincipal
= [davElementWithContent (@"current-user-principal",