Skip to content

Commit

Permalink
fix(sab): put location in proper address field
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
JohannesGGE authored and nextcloud-command committed Jul 7, 2023
1 parent d2be510 commit db8da6a
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 db8da6a

Please sign in to comment.