1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

MSC3786: Add a default push rule to ignore m.room.server_acl events (#2333)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Šimon Brandner
2022-05-04 16:22:43 +02:00
committed by GitHub
parent 592f2931dc
commit 1cde686a13
2 changed files with 34 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ import {
PushRuleSet,
TweakName,
} from "./@types/PushRules";
import { EventType } from "./@types/event";
/**
* @module pushprocessor
@@ -96,6 +97,22 @@ const DEFAULT_OVERRIDE_RULES: IPushRule[] = [
PushRuleActionName.DontNotify,
],
},
{
// For homeservers which don't support MSC3786 yet
rule_id: ".org.matrix.msc3786.rule.room.server_acl",
default: true,
enabled: true,
conditions: [
{
kind: ConditionKind.EventMatch,
key: "type",
pattern: EventType.RoomServerAcl,
},
],
actions: [
PushRuleActionName.DontNotify,
],
},
];
export interface IActionsObject {