diff --git a/crates/ruma-common/CHANGELOG.md b/crates/ruma-common/CHANGELOG.md index fbe01ccf..b5c7ab0d 100644 --- a/crates/ruma-common/CHANGELOG.md +++ b/crates/ruma-common/CHANGELOG.md @@ -1,5 +1,9 @@ # [unreleased] +Bug fixes: + +- Allow to deserialize `(New)ConditionalPushRule` with a missing `conditions` field. + # 0.12.0 Bug fixes: diff --git a/crates/ruma-common/src/push.rs b/crates/ruma-common/src/push.rs index f497834e..3c0fd31f 100644 --- a/crates/ruma-common/src/push.rs +++ b/crates/ruma-common/src/push.rs @@ -466,6 +466,7 @@ pub struct ConditionalPushRule { /// event. /// /// A rule with no conditions always matches. + #[serde(default)] pub conditions: Vec, } @@ -870,6 +871,7 @@ pub struct NewConditionalPushRule { /// event. /// /// A rule with no conditions always matches. + #[serde(default)] pub conditions: Vec, /// Actions to determine if and how a notification is delivered for events matching this