Return CTag on /dav/cal/account resources (just to make iOS happy)
This commit is contained in:
@@ -10,7 +10,8 @@ use common::{Server, auth::AccessToken};
|
||||
use dav_proto::schema::{
|
||||
Namespace,
|
||||
property::{
|
||||
DavProperty, PrincipalProperty, Privilege, ReportSet, ResourceType, WebDavProperty,
|
||||
DavProperty, DavValue, PrincipalProperty, Privilege, ReportSet, ResourceType,
|
||||
WebDavProperty,
|
||||
},
|
||||
request::{DavPropertyValue, PropFind},
|
||||
response::{Href, MultiStatus, PropStat, Response},
|
||||
@@ -193,6 +194,18 @@ impl PrincipalPropFind for Server {
|
||||
|
||||
fields.push(DavPropertyValue::new(property.clone(), sync_token));
|
||||
}
|
||||
WebDavProperty::GetCTag if !is_principal => {
|
||||
let ctag = self
|
||||
.fetch_dav_resources(access_token, account_id, collection.into())
|
||||
.await
|
||||
.caused_by(trc::location!())?
|
||||
.highest_change_id;
|
||||
|
||||
fields.push(DavPropertyValue::new(
|
||||
property.clone(),
|
||||
DavValue::String(format!("\"{ctag}\"")),
|
||||
));
|
||||
}
|
||||
WebDavProperty::Owner => {
|
||||
fields.push(DavPropertyValue::new(
|
||||
property.clone(),
|
||||
|
||||
Reference in New Issue
Block a user