mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-31 19:48:18 +00:00
Update caldata-rs
This commit is contained in:
@@ -43,28 +43,28 @@ pub async fn route_get<C: CalendarStore, S: SubscriptionStore>(
|
||||
if let Some(displayname) = calendar.meta.displayname {
|
||||
props.push(ContentLine {
|
||||
name: "X-WR-CALNAME".to_owned(),
|
||||
value: Some(displayname),
|
||||
value: displayname,
|
||||
params: vec![].into(),
|
||||
});
|
||||
}
|
||||
if let Some(description) = calendar.meta.description {
|
||||
props.push(ContentLine {
|
||||
name: "X-WR-CALDESC".to_owned(),
|
||||
value: Some(description),
|
||||
value: description,
|
||||
params: vec![].into(),
|
||||
});
|
||||
}
|
||||
if let Some(color) = calendar.meta.color {
|
||||
props.push(ContentLine {
|
||||
name: "X-WR-CALCOLOR".to_owned(),
|
||||
value: Some(color),
|
||||
value: color,
|
||||
params: vec![].into(),
|
||||
});
|
||||
}
|
||||
if let Some(timezone_id) = calendar.timezone_id {
|
||||
props.push(ContentLine {
|
||||
name: "X-WR-TIMEZONE".to_owned(),
|
||||
value: Some(timezone_id),
|
||||
value: timezone_id,
|
||||
params: vec![].into(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@ pub async fn route_import<C: CalendarStore, S: SubscriptionStore>(
|
||||
// Extract calendar metadata
|
||||
let displayname = cal
|
||||
.get_property("X-WR-CALNAME")
|
||||
.and_then(|prop| prop.value.clone());
|
||||
.map(|prop| prop.value.clone());
|
||||
let description = cal
|
||||
.get_property("X-WR-CALDESC")
|
||||
.and_then(|prop| prop.value.clone());
|
||||
.map(|prop| prop.value.clone());
|
||||
let color = cal
|
||||
.get_property("X-WR-CALCOLOR")
|
||||
.and_then(|prop| prop.value.clone());
|
||||
.map(|prop| prop.value.clone());
|
||||
let timezone_id = cal
|
||||
.get_property("X-WR-TIMEZONE")
|
||||
.and_then(|prop| prop.value.clone());
|
||||
.map(|prop| prop.value.clone());
|
||||
// These properties should not appear in the expanded calendar objects
|
||||
cal.remove_property("X-WR-CALNAME");
|
||||
cal.remove_property("X-WR-CALDESC");
|
||||
|
||||
Reference in New Issue
Block a user