From 4c65660b96335339d08e558856b6a2dd6a6fc9c8 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 3 Jul 2019 10:59:38 +0100 Subject: [PATCH] Clarify `.m.rule.room_one_to_one` push rule This clarifies the `.m.rule.room_one_to_one` push rule by adding a condition on event type. Some parts of the spec already had this info, while others were missing it. Synapse has had this behaviour since the push rule appeared. Fixes https://github.com/matrix-org/matrix-doc/issues/2150 --- api/client-server/pushrules.yaml | 9 +++++++-- event-schemas/examples/m.push_rules | 9 +++++++-- specification/modules/push.rst | 5 +++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/api/client-server/pushrules.yaml b/api/client-server/pushrules.yaml index e23c9189..a1cbc354 100644 --- a/api/client-server/pushrules.yaml +++ b/api/client-server/pushrules.yaml @@ -159,8 +159,13 @@ paths: ], "conditions": [ { - "is": "2", - "kind": "room_member_count" + "kind": "room_member_count", + "is": "2" + }, + { + "kind": "event_match", + "key": "type", + "pattern": "m.room.message" } ], "default": true, diff --git a/event-schemas/examples/m.push_rules b/event-schemas/examples/m.push_rules index e4f0a959..34bc2fe6 100644 --- a/event-schemas/examples/m.push_rules +++ b/event-schemas/examples/m.push_rules @@ -107,8 +107,13 @@ ], "conditions": [ { - "is": "2", - "kind": "room_member_count" + "kind": "room_member_count", + "is": "2" + }, + { + "kind": "event_match", + "key": "type", + "pattern": "m.room.message" } ], "default": true, diff --git a/specification/modules/push.rst b/specification/modules/push.rst index 33ca7fd7..b16ed8a6 100644 --- a/specification/modules/push.rst +++ b/specification/modules/push.rst @@ -563,6 +563,11 @@ Definition: { "kind": "room_member_count", "is": "2" + }, + { + "kind": "event_match", + "key": "type", + "pattern": "m.room.message" } ], "actions": [