mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-09 13:34:26 +08:00
Return CTag on /dav/cal/account resources (just to make iOS happy)
This commit is contained in:
parent
cc78487fcb
commit
0c5581b1a9
1 changed files with 14 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Reference in a new issue