From 012f6c56e6d45d22adfbe85ae07f7dc539b23625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 3 Jun 2022 06:06:48 +0200 Subject: [PATCH] Update MSC3786 implementation: Check the `state_key` (#2429) --- spec/unit/pushprocessor.spec.js | 1 + src/pushprocessor.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/spec/unit/pushprocessor.spec.js b/spec/unit/pushprocessor.spec.js index df7666d5c..0fab43d07 100644 --- a/spec/unit/pushprocessor.spec.js +++ b/spec/unit/pushprocessor.spec.js @@ -302,6 +302,7 @@ describe('NotificationService', function() { type: EventType.RoomServerAcl, room: testRoomId, user: "@alfred:localhost", + skey: "", event: true, content: {}, }); diff --git a/src/pushprocessor.ts b/src/pushprocessor.ts index 448015203..950f395b7 100644 --- a/src/pushprocessor.ts +++ b/src/pushprocessor.ts @@ -83,6 +83,11 @@ const DEFAULT_OVERRIDE_RULES: IPushRule[] = [ key: "type", pattern: EventType.RoomServerAcl, }, + { + kind: ConditionKind.EventMatch, + key: "state_key", + pattern: "", + }, ], actions: [], },