From 2cfbe3fb49d1bde66b55e565676bbce25f786357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 20 Oct 2022 17:23:11 +0200 Subject: [PATCH 1/3] MSC: Matrix native group call push rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- proposals/0000-call-notif.md | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 proposals/0000-call-notif.md diff --git a/proposals/0000-call-notif.md b/proposals/0000-call-notif.md new file mode 100644 index 00000000000..a8f6fd63c5d --- /dev/null +++ b/proposals/0000-call-notif.md @@ -0,0 +1,64 @@ +# MSC0000: Matrix native group call push rule + +[MSC3401](https://github.com/matrix-org/matrix-spec-proposals/pull/3401) defines +how group calls can happen over Matrix. It adds a an `m.call` state event with +an `m.intent` field which, if it has a value of `m.ring` or `m.prompt`, should +cause a notification should be shown to the user. This MSC defines a new push +rule for this scenario. + +## Proposal + +A new push-rule condition is added with the name `call_started`. For this +condition to be met the following conditions have to be met: + +- `m.intent` must either be `m.ring` or `m.prompt` +- `m.terminated` must _not_ be in the content +- the `prev_content` is either missing or includes `m.terminated` + +This is a new push condition since the current push-rule system is not flexible +enough for this to be built out of existing rules. + +A new [default override +rule](https://spec.matrix.org/v1.2/client-server-api/#default-override-rules) is +to be added: + +```json +{ + "rule_id": ".m.rule.room.call", + "default": true, + "enabled": true, + "conditions": [ + { + "kind": "event_match", + "key": "type", + "pattern": "m.call" + }, + { + "kind": "call_started" + } + ], + "actions": [ + "notify", + {"set_tweak": "sound", "value": "default"} + ] +} +``` + +This new push rule is inserted immediately after `.m.rule.tombstone`. + +## Potential issues + +Once we have state event E2EE all notifications will have to be handled +client-side as the server won't see the content of events. + +## Alternatives + +This could be implemented entirely client-side without any push rule though this +presents an issue for mobile devices which can't sync all the time and therefore +need to receive push notifications. + +## Unstable prefix + +During development, `.org.matrix.msc000.rule.room.call` and +`org.matrix.msc0000.call_started` is to be used instead of `.m.rule.room.call` +and `call_started` respectively. From 70ca2f43d93b95cef40dc82286f8858958403cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 20 Oct 2022 17:25:07 +0200 Subject: [PATCH 2/3] Fix MSC number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- proposals/{0000-call-notif.md => 3914-call-notif.md} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename proposals/{0000-call-notif.md => 3914-call-notif.md} (91%) diff --git a/proposals/0000-call-notif.md b/proposals/3914-call-notif.md similarity index 91% rename from proposals/0000-call-notif.md rename to proposals/3914-call-notif.md index a8f6fd63c5d..17c35e95ef2 100644 --- a/proposals/0000-call-notif.md +++ b/proposals/3914-call-notif.md @@ -1,4 +1,4 @@ -# MSC0000: Matrix native group call push rule +# MSC3914: Matrix native group call push rule [MSC3401](https://github.com/matrix-org/matrix-spec-proposals/pull/3401) defines how group calls can happen over Matrix. It adds a an `m.call` state event with @@ -59,6 +59,6 @@ need to receive push notifications. ## Unstable prefix -During development, `.org.matrix.msc000.rule.room.call` and -`org.matrix.msc0000.call_started` is to be used instead of `.m.rule.room.call` +During development, `.org.matrix.msc3914.rule.room.call` and +`org.matrix.msc3914.call_started` is to be used instead of `.m.rule.room.call` and `call_started` respectively. From b07f37eade3d20c70662fdfac9f41d47cf634525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 11 Nov 2022 17:29:44 +0100 Subject: [PATCH 3/3] Use an underride rule instead of an override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- proposals/3914-call-notif.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proposals/3914-call-notif.md b/proposals/3914-call-notif.md index 17c35e95ef2..04d3a2d6573 100644 --- a/proposals/3914-call-notif.md +++ b/proposals/3914-call-notif.md @@ -18,8 +18,8 @@ condition to be met the following conditions have to be met: This is a new push condition since the current push-rule system is not flexible enough for this to be built out of existing rules. -A new [default override -rule](https://spec.matrix.org/v1.2/client-server-api/#default-override-rules) is +A new [default underride +rule](https://spec.matrix.org/v1.2/client-server-api/#default-underride-rules) is to be added: ```json @@ -44,7 +44,7 @@ to be added: } ``` -This new push rule is inserted immediately after `.m.rule.tombstone`. +This new push rule is inserted immediately after `.m.rule.call`. ## Potential issues