From c54fd437e3b7e750e83b8d577b5419f6c69fde42 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 22 Oct 2026 14:13:46 +0200 Subject: [PATCH] Switch the RTC notification rules to event-property-is (#20366) As suggested in https://github.com/matrix-org/matrix-spec-proposals/pull/4075#discussion_r4288130493. --- changelog.d/20366.misc | 1 + rust/src/push/base_rules.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 changelog.d/20366.misc 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"),