Skip to content

Commit

Permalink
remove stupid skip_serializing_if on push rulesets
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo committed Dec 15, 2024
1 parent 5a826d3 commit a204cb5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/ruma-common/src/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ pub use self::{
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct Ruleset {
/// These rules configure behavior for (unencrypted) messages that match certain patterns.
#[serde(default, skip_serializing_if = "IndexSet::is_empty")]
#[serde(default)]
pub content: IndexSet<PatternedPushRule>,

/// These user-configured rules are given the highest priority.
///
/// This field is named `override_` instead of `override` because the latter is a reserved
/// keyword in Rust.
#[serde(rename = "override", default, skip_serializing_if = "IndexSet::is_empty")]
#[serde(rename = "override", default)]
pub override_: IndexSet<ConditionalPushRule>,

/// These rules change the behavior of all messages for a given room.
#[serde(default, skip_serializing_if = "IndexSet::is_empty")]
#[serde(default)]
pub room: IndexSet<SimplePushRule<OwnedRoomId>>,

/// These rules configure notification behavior for messages from a specific Matrix user ID.
#[serde(default, skip_serializing_if = "IndexSet::is_empty")]
#[serde(default)]
pub sender: IndexSet<SimplePushRule<OwnedUserId>>,

/// These rules are identical to override rules, but have a lower priority than `content`,
/// `room` and `sender` rules.
#[serde(default, skip_serializing_if = "IndexSet::is_empty")]
#[serde(default)]
pub underride: IndexSet<ConditionalPushRule>,
}

Expand Down

0 comments on commit a204cb5

Please sign in to comment.