Fix CardDAV: Version requests included in address-data are ignored
This commit is contained in:
@@ -68,7 +68,10 @@ pub(crate) static CARD_ITEM_PROPS: [DavProperty; 20] = [
|
||||
DavProperty::WebDav(WebDavProperty::GetContentLanguage),
|
||||
DavProperty::WebDav(WebDavProperty::GetContentLength),
|
||||
DavProperty::WebDav(WebDavProperty::GetContentType),
|
||||
DavProperty::CardDav(CardDavProperty::AddressData(vec![])),
|
||||
DavProperty::CardDav(CardDavProperty::AddressData {
|
||||
properties: Vec::new(),
|
||||
version: None,
|
||||
}),
|
||||
];
|
||||
|
||||
pub(crate) async fn assert_is_unique_uid(
|
||||
|
||||
@@ -839,16 +839,19 @@ impl PropFindRequestHandler for Server {
|
||||
));
|
||||
}
|
||||
(
|
||||
CardDavProperty::AddressData(items),
|
||||
CardDavProperty::AddressData {
|
||||
properties,
|
||||
version,
|
||||
},
|
||||
ArchivedResource::ContactCard(card),
|
||||
) => {
|
||||
fields.push(DavPropertyValue::new(
|
||||
property.clone(),
|
||||
DavValue::CData(serialize_vcard_with_props(
|
||||
&card.inner.card,
|
||||
items,
|
||||
query
|
||||
.max_vcard_version
|
||||
properties,
|
||||
(*version)
|
||||
.or(query.max_vcard_version)
|
||||
.or_else(|| card.inner.card.version()),
|
||||
)),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user