fix(sab): put location in proper address field

Signed-off-by: Johannes Merkel <mail@johannesgge.de>
pull/38856/head
Johannes Merkel 2023-06-16 14:29:26 +07:00 committed by Johannes
parent 14ac281acf
commit 3cb8968808
2 changed files with 14 additions and 2 deletions

@ -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]));

@ -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>