push: Allow to deserialize (New)ConditionalPushRule without conditions

This commit is contained in:
Kévin Commaille 2023-11-12 14:13:27 +01:00 committed by Kévin Commaille
parent 5d0ac84ff8
commit 9b07772d1a
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# [unreleased]
Bug fixes:
- Allow to deserialize `(New)ConditionalPushRule` with a missing `conditions` field.
# 0.12.0
Bug fixes:

View File

@ -466,6 +466,7 @@ pub struct ConditionalPushRule {
/// event.
///
/// A rule with no conditions always matches.
#[serde(default)]
pub conditions: Vec<PushCondition>,
}
@ -870,6 +871,7 @@ pub struct NewConditionalPushRule {
/// event.
///
/// A rule with no conditions always matches.
#[serde(default)]
pub conditions: Vec<PushCondition>,
/// Actions to determine if and how a notification is delivered for events matching this