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-06-04 11:55:45 +02:00
committed by Hivert Quentin
parent f11f34cdef
commit 17cd008223
13 changed files with 136 additions and 9 deletions
+4 -1
View File
@@ -102,11 +102,14 @@
ownerUser = [SOGoUser userWithLogin: nameInContainer roles: nil];
login = [ownerUser login];
[self setOwner: login];
if (![nameInContainer isEqualToString: login])
if (![nameInContainer isEqualToString: login]
&& [nameInContainer rangeOfString: @"!"].location == NSNotFound)
// In case the user domain is specified in the URL but not in the user
// login name, we remove it (user@domain => user).
// This happens when SOGoLoginDomains is defined but
// SOGoEnableDomainBasedUID is disabled.
// The !book alias used by the per-addressbook CardDAV profile must be
// preserved here so generated hrefs keep the discriminator.
ASSIGN(nameInContainer, login);
}