From fa2ebe5855e5833ec32809301c0f44f4875065ce Mon Sep 17 00:00:00 2001 From: Johannes Merkel Date: Fri, 16 Jun 2023 14:29:26 +0200 Subject: [PATCH] fix(sab): put location in proper address field Signed-off-by: Johannes Merkel --- apps/dav/lib/CardDAV/Converter.php | 14 +++++++++++++- .../components/PersonalInfo/LocationSection.vue | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index c6c8f96308b5a..254c8015acf61 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -92,7 +92,19 @@ public function createCardFromUser(IUser $user): ?VCard { $vCard->add(new Text($vCard, 'TEL', $property->getValue(), ['TYPE' => 'OTHER', '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])); diff --git a/apps/settings/src/components/PersonalInfo/LocationSection.vue b/apps/settings/src/components/PersonalInfo/LocationSection.vue index ceef7c432cdef..57811ddf3b094 100644 --- a/apps/settings/src/components/PersonalInfo/LocationSection.vue +++ b/apps/settings/src/components/PersonalInfo/LocationSection.vue @@ -23,7 +23,7 @@