diff --git a/changelog.d/20366.misc b/changelog.d/20366.misc new file mode 100644 index 0000000000..e8a7fbf125 --- /dev/null +++ b/changelog.d/20366.misc @@ -0,0 +1 @@ +Switch the MatrixRTC notification push rules to `event_property_is`. diff --git a/rust/src/push/base_rules.rs b/rust/src/push/base_rules.rs index af7e6c83fb..8ad53507a0 100644 --- a/rust/src/push/base_rules.rs +++ b/rust/src/push/base_rules.rs @@ -149,9 +149,11 @@ pub const BASE_APPEND_OVERRIDE_RULES: &[PushRule] = &[ rule_id: Cow::Borrowed("global/override/.org.matrix.msc4075.rule.rtc.invite_for_me"), priority_class: 5, conditions: Cow::Borrowed(&[ - Condition::Known(KnownCondition::EventMatch(EventMatchCondition { + Condition::Known(KnownCondition::EventPropertyIs(EventPropertyIsCondition { key: Cow::Borrowed("type"), - pattern: Cow::Borrowed("org.matrix.msc4075.rtc.notification"), + value: Cow::Owned(SimpleJsonValue::Str(Cow::Borrowed( + "org.matrix.msc4075.rtc.notification", + ))), })), Condition::Known(KnownCondition::ExactEventPropertyContainsType( EventPropertyIsTypeCondition { @@ -168,9 +170,11 @@ pub const BASE_APPEND_OVERRIDE_RULES: &[PushRule] = &[ rule_id: Cow::Borrowed("global/override/.org.matrix.msc4075.rule.rtc.invite_for_room"), priority_class: 5, conditions: Cow::Borrowed(&[ - Condition::Known(KnownCondition::EventMatch(EventMatchCondition { + Condition::Known(KnownCondition::EventPropertyIs(EventPropertyIsCondition { key: Cow::Borrowed("type"), - pattern: Cow::Borrowed("org.matrix.msc4075.rtc.notification"), + value: Cow::Owned(SimpleJsonValue::Str(Cow::Borrowed( + "org.matrix.msc4075.rtc.notification", + ))), })), Condition::Known(KnownCondition::EventPropertyIs(EventPropertyIsCondition { key: Cow::Borrowed(r"content.m\.mentions.room"),