Skip to content

Commit 9559e50

Browse files
committed
fix(sab): put location in proper address field
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
1 parent d119cb1 commit 9559e50

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

apps/dav/lib/CardDAV/Converter.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,19 @@ public function createCardFromUser(IUser $user): ?VCard {
9292
$vCard->add(new Text($vCard, 'TEL', $property->getValue(), ['TYPE' => 'OTHER', 'X-NC-SCOPE' => $scope]));
9393
break;
9494
case IAccountManager::PROPERTY_ADDRESS:
95-
$vCard->add(new Text($vCard, 'ADR', $property->getValue(), ['TYPE' => 'OTHER', 'X-NC-SCOPE' => $scope]));
95+
// structured prop: https://www.rfc-editor.org/rfc/rfc6350.html#section-6.3.1
96+
// post office box;extended address;street address;locality;region;postal code;country
97+
$vCard->add(
98+
new Text(
99+
$vCard,
100+
'ADR',
101+
[ '', '', '', $property->getValue(), '', '', '' ],
102+
[
103+
'TYPE' => 'OTHER',
104+
'X-NC-SCOPE' => $scope,
105+
]
106+
)
107+
);
96108
break;
97109
case IAccountManager::PROPERTY_TWITTER:
98110
$vCard->add(new Text($vCard, 'X-SOCIALPROFILE', $property->getValue(), ['TYPE' => 'TWITTER', 'X-NC-SCOPE' => $scope]));

apps/settings/src/components/PersonalInfo/LocationSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<template>
2424
<AccountPropertySection v-bind.sync="location"
2525
autocomplete="address-level1"
26-
:placeholder="t('settings', 'Your location')" />
26+
:placeholder="t('settings', 'Your city')" />
2727
</template>
2828

2929
<script>

0 commit comments

Comments
 (0)