dav: Add namespace to propname

This commit is contained in:
Lennart
2025-05-10 13:13:51 +02:00
parent 37eb6df64a
commit 8f69bc839a
5 changed files with 33 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ impl ReportRequest {
}
PropfindType::Prop(PropElement(prop_tags)) => prop_tags
.iter()
.map(|propname| propname.0.as_str())
.map(|propname| propname.name.as_str())
.collect(),
}
}
@@ -112,9 +112,10 @@ mod tests {
ReportRequest::SyncCollection(SyncCollectionRequest {
sync_token: "".to_owned(),
sync_level: SyncLevel::One,
prop: rustical_dav::xml::PropfindType::Prop(PropElement(vec![Propname(
"getetag".to_owned()
)])),
prop: rustical_dav::xml::PropfindType::Prop(PropElement(vec![Propname {
name: "getetag".to_owned(),
ns: Some("DAV:".to_owned())
}])),
limit: None
})
)
@@ -137,8 +138,8 @@ mod tests {
report_request,
ReportRequest::AddressbookMultiget(AddressbookMultigetRequest {
prop: rustical_dav::xml::PropfindType::Prop(PropElement(vec![
Propname("getetag".to_owned()),
Propname("address-data".to_owned())
Propname{name: "getetag".to_owned(), ns: Some("DAV:".to_owned())},
Propname{name: "address-data".to_owned(), ns: Some("urn:ietf:params:xml:ns:carddav".to_owned())}
])),
href: vec![
"/carddav/user/user/6f787542-5256-401a-8db97003260da/ae7a998fdfd1d84a20391168962c62b".to_owned()