summary refs log tree commit diff
diff options
context:
space:
mode:
authorSumiran Pokharel <130939290+Sumpy1@users.noreply.github.com>2024-04-09 09:07:26 -0400
committerGitHub <noreply@github.com>2024-04-09 14:07:26 +0100
commit4ffed6330f3f2c705f25099c59d772a142b7bd93 (patch)
treeb14af0ea6e01f9addb8c45015b392edd39ab5265
parentFix PR #16677, a parameter was missing in a function call (#17033) (diff)
downloadsynapse-4ffed6330f3f2c705f25099c59d772a142b7bd93.tar.xz
#17039 Issue: Update base_rules.rs (#17043)
Co-authored-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
-rw-r--r--changelog.d/17043.bugfix1
-rw-r--r--rust/src/push/base_rules.rs8
2 files changed, 5 insertions, 4 deletions
diff --git a/changelog.d/17043.bugfix b/changelog.d/17043.bugfix
new file mode 100644
index 0000000000..fc3bd2baa5
--- /dev/null
+++ b/changelog.d/17043.bugfix
@@ -0,0 +1 @@
+Fix the `.m.rule.encrypted_room_one_to_one` and `.m.rule.room_one_to_one` default underride push rules being in the wrong order. Contributed by @Sumpy1.
diff --git a/rust/src/push/base_rules.rs b/rust/src/push/base_rules.rs
index b00390f7e4..74f02d6001 100644
--- a/rust/src/push/base_rules.rs
+++ b/rust/src/push/base_rules.rs
@@ -304,12 +304,12 @@ pub const BASE_APPEND_UNDERRIDE_RULES: &[PushRule] = &[
         default_enabled: true,
     },
     PushRule {
-        rule_id: Cow::Borrowed("global/underride/.m.rule.room_one_to_one"),
+        rule_id: Cow::Borrowed("global/underride/.m.rule.encrypted_room_one_to_one"),
         priority_class: 1,
         conditions: Cow::Borrowed(&[
             Condition::Known(KnownCondition::EventMatch(EventMatchCondition {
                 key: Cow::Borrowed("type"),
-                pattern: Cow::Borrowed("m.room.message"),
+                pattern: Cow::Borrowed("m.room.encrypted"),
             })),
             Condition::Known(KnownCondition::RoomMemberCount {
                 is: Some(Cow::Borrowed("2")),
@@ -320,12 +320,12 @@ pub const BASE_APPEND_UNDERRIDE_RULES: &[PushRule] = &[
         default_enabled: true,
     },
     PushRule {
-        rule_id: Cow::Borrowed("global/underride/.m.rule.encrypted_room_one_to_one"),
+        rule_id: Cow::Borrowed("global/underride/.m.rule.room_one_to_one"),
         priority_class: 1,
         conditions: Cow::Borrowed(&[
             Condition::Known(KnownCondition::EventMatch(EventMatchCondition {
                 key: Cow::Borrowed("type"),
-                pattern: Cow::Borrowed("m.room.encrypted"),
+                pattern: Cow::Borrowed("m.room.message"),
             })),
             Condition::Known(KnownCondition::RoomMemberCount {
                 is: Some(Cow::Borrowed("2")),