]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(sab): put location in proper address field 38856/head
authorJohannes Merkel <mail@johannesgge.de>
Fri, 16 Jun 2023 12:29:26 +0000 (14:29 +0200)
committerJohannes <74607597+JohannesGGE@users.noreply.github.com>
Tue, 20 Jun 2023 14:18:09 +0000 (16:18 +0200)
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
apps/dav/lib/CardDAV/Converter.php
apps/settings/src/components/PersonalInfo/LocationSection.vue

index c8add1b96a6e9427cb490f9773406cd132512686..b3d8b094d69317e7a27c1c34febf5ca8321a32c7 100644 (file)
@@ -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]));
index ceef7c432cdef5744ea60a2e479be461ee44b0c9..57811ddf3b094878ab2a7d6d53bb39dad588f9dc 100644 (file)
@@ -23,7 +23,7 @@
 <template>
        <AccountPropertySection v-bind.sync="location"
                autocomplete="address-level1"
-               :placeholder="t('settings', 'Your location')" />
+               :placeholder="t('settings', 'Your city')" />
 </template>
 
 <script>