From 4c65660b96335339d08e558856b6a2dd6a6fc9c8 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 3 Jul 2019 10:59:38 +0100 Subject: [PATCH 1/2] 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": [ From 9208c5cd13e8006a8bb01a4c4e6537db04b2dd3f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 3 Jul 2019 11:34:00 +0100 Subject: [PATCH 2/2] Add changelog --- changelogs/client_server/newsfragments/2152.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/client_server/newsfragments/2152.clarification diff --git a/changelogs/client_server/newsfragments/2152.clarification b/changelogs/client_server/newsfragments/2152.clarification new file mode 100644 index 00000000..03fde9ff --- /dev/null +++ b/changelogs/client_server/newsfragments/2152.clarification @@ -0,0 +1 @@ +Clarify the conditions for the ``.m.rule.room_one_to_one`` push rule.