Skip to content

Commit

Permalink
Merge pull request #38947 from nextcloud/fix/contacts/3404/put-locati…
Browse files Browse the repository at this point in the history
…on-in-proper-place-stable27

[stable27] Manuel backport: fix(sab): put location in proper address field
  • Loading branch information
JohannesGGE committed Jul 7, 2023
2 parents 8f20b0c + db8da6a commit 05de066
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
14 changes: 13 additions & 1 deletion apps/dav/lib/CardDAV/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-vue-settings-personal-info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-info.js.map

Large diffs are not rendered by default.

0 comments on commit 05de066

Please sign in to comment.