Skip to content

Commit 73ab4c1

Browse files
kkoralskybim9262
authored andcommitted
blocks[calendar]: parse multiple comp within support-calendar-component-set
1 parent bb1a479 commit 73ab4c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/blocks/calendar/caldav.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,12 @@ enum ResourceType {
228228

229229
#[derive(Debug, Deserialize)]
230230
struct SupportedCalendarComponentSet {
231-
comp: Option<Comp>,
231+
#[serde(rename = "$value", default)]
232+
pub values: Vec<Comp>,
232233
}
233234
impl SupportedCalendarComponentSet {
234235
fn supports_events(&self) -> bool {
235-
self.comp.as_ref().is_some_and(|v| v.name == "VEVENT")
236+
self.values.iter().any(|v| v.name == "VEVENT")
236237
}
237238
}
238239

0 commit comments

Comments
 (0)