diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2022-10-25 13:38:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 14:38:01 +0100 |
commit | 2d0ba3f89aaf9545d81c4027500e543ec70b68a6 (patch) | |
tree | a9830a6ea27b82ff04a749dadeafbc49ca7d9e27 /rust/src/push/base_rules.rs | |
parent | Remove unused `@lru_cache` decorator (#13595) (diff) | |
download | synapse-2d0ba3f89aaf9545d81c4027500e543ec70b68a6.tar.xz |
Implementation for MSC3664: Pushrules for relations (#11804)
Diffstat (limited to 'rust/src/push/base_rules.rs')
-rw-r--r-- | rust/src/push/base_rules.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/rust/src/push/base_rules.rs b/rust/src/push/base_rules.rs index 63240cacfc..49802fa4eb 100644 --- a/rust/src/push/base_rules.rs +++ b/rust/src/push/base_rules.rs @@ -25,6 +25,7 @@ use crate::push::Action; use crate::push::Condition; use crate::push::EventMatchCondition; use crate::push::PushRule; +use crate::push::RelatedEventMatchCondition; use crate::push::SetTweak; use crate::push::TweakValue; @@ -115,6 +116,22 @@ pub const BASE_APPEND_OVERRIDE_RULES: &[PushRule] = &[ default_enabled: true, }, PushRule { + rule_id: Cow::Borrowed("global/override/.im.nheko.msc3664.reply"), + priority_class: 5, + conditions: Cow::Borrowed(&[Condition::Known(KnownCondition::RelatedEventMatch( + RelatedEventMatchCondition { + key: Some(Cow::Borrowed("sender")), + pattern: None, + pattern_type: Some(Cow::Borrowed("user_id")), + rel_type: Cow::Borrowed("m.in_reply_to"), + include_fallbacks: None, + }, + ))]), + actions: Cow::Borrowed(&[Action::Notify, HIGHLIGHT_ACTION, SOUND_ACTION]), + default: true, + default_enabled: true, + }, + PushRule { rule_id: Cow::Borrowed("global/override/.m.rule.contains_display_name"), priority_class: 5, conditions: Cow::Borrowed(&[Condition::Known(KnownCondition::ContainsDisplayName)]), |