diff options
author | Johannes <74607597+JohannesGGE@users.noreply.github.com> | 2023-06-22 11:51:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 11:51:33 +0200 |
commit | 199b9788e696696f32ded025df0b8c1bb2a8ce02 (patch) | |
tree | 67670c6d9dbb271ec0703b30fc509e75f14fe19a /apps/dav/lib/CardDAV | |
parent | 618c3a4817cf3180d760c191623a515ded39f520 (diff) | |
parent | 3cb89688087b87ed5dea1d58dca92e7b873f8258 (diff) | |
download | nextcloud-server-199b9788e696696f32ded025df0b8c1bb2a8ce02.tar.gz nextcloud-server-199b9788e696696f32ded025df0b8c1bb2a8ce02.zip |
Merge pull request #38856 from nextcloud/fix/contacts/3404/put-location-in-proper-place
fix(sab): put location in proper address field
Diffstat (limited to 'apps/dav/lib/CardDAV')
-rw-r--r-- | apps/dav/lib/CardDAV/Converter.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index c8add1b96a6..b3d8b094d69 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -92,7 +92,19 @@ class Converter { $vCard->add(new Text($vCard, 'TEL', $property->getValue(), ['TYPE' => 'VOICE', 'X-NC-SCOPE' => $scope])); break; case IAccountManager::PROPERTY_ADDRESS: - $vCard->add(new Text($vCard, 'ADR', $property->getValue(), ['TYPE' => 'OTHER', 'X-NC-SCOPE' => $scope])); + // structured prop: https://www.rfc-editor.org/rfc/rfc6350.html#section-6.3.1 + // post office box;extended address;street address;locality;region;postal code;country + $vCard->add( + new Text( + $vCard, + 'ADR', + [ '', '', '', $property->getValue(), '', '', '' ], + [ + 'TYPE' => 'OTHER', + 'X-NC-SCOPE' => $scope, + ] + ) + ); break; case IAccountManager::PROPERTY_TWITTER: $vCard->add(new Text($vCard, 'X-SOCIALPROFILE', $property->getValue(), ['TYPE' => 'TWITTER', 'X-NC-SCOPE' => $scope])); |