From 1315cb08f5f7366c5fbd736361bf3ffe9c5890aa Mon Sep 17 00:00:00 2001 From: Timo K Date: Tue, 26 Aug 2025 11:04:16 +0200 Subject: [PATCH] make decline a new event type Signed-off-by: Timo K --- .../4310-matrixRTC-call-decline-realtions.svg | 191 +++++++++++------- proposals/4310-matrixRTC-call-decline.md | 23 +-- 2 files changed, 127 insertions(+), 87 deletions(-) diff --git a/proposals/4310-matrixRTC-call-decline-realtions.svg b/proposals/4310-matrixRTC-call-decline-realtions.svg index 91c147e0a..ed4d48c69 100644 --- a/proposals/4310-matrixRTC-call-decline-realtions.svg +++ b/proposals/4310-matrixRTC-call-decline-realtions.svg @@ -7,8 +7,31 @@ viewBox="0 0 133.16223 135.95966" version="1.1" id="svg1" + sodipodi:docname="4310-matrixRTC-call-decline-realtions.svg" + inkscape:version="1.3 (0e150ed, 2023-07-21)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + m.call.notify{ "notify_type": "ring" "m.relates_to": { "rel_type": "m.call.notification", "event_id": "$state_event_id", } ...} + y="61.062046" /> m.call.notify{ "notify_type": "decline" "m.relates_to": { "rel_type": "m.call.notification", "event_id": "$initial_ring_event_id", } ...} + sodipodi:role="line" + id="tspan18" + x="14.100647" + y="62.153454" + style="font-weight:bold">m.rtc.notification{ "notification_type": "ring", "m.relates_to": { "rel_type": "m.call.notification", "event_id": "$initial_member_id", } ...} + m.rtc.notification.decline{ "decline_reason: "some reason" "m.relates_to": { "rel_type": "m.rtc.decline", "event_id": "$initial_ring_event_id", }} + diff --git a/proposals/4310-matrixRTC-call-decline.md b/proposals/4310-matrixRTC-call-decline.md index a7c995675..e3159ba9d 100644 --- a/proposals/4310-matrixRTC-call-decline.md +++ b/proposals/4310-matrixRTC-call-decline.md @@ -10,13 +10,13 @@ signalling and general purpose MatrixRTC session state. ## Context This proposal builds on the concept of [MSC4075: MatrixRTC Call Ringing](https://github.com/matrix-org/matrix-spec-proposals/pull/4075) -introducint the `m.rtc.notification` event. +introducing the `m.rtc.notification` event. This event lives in parallel with the MatrixRTC session and uses intentional mentions to make the receiving clients ring. The receiving clients will then monitor the room state and stop ringing once the user joined with one of their devices. ## Proposal -Conceptually this MSC will introduce a new notify type, that will be sent as a relation to the `m.rtc.notification` event +Conceptually this MSC will introduce a event, that will be sent as a relation to the `m.rtc.notification` event which communicates a decline from one or more parties. It can be used on the clients to provide a good UX around a call decline (stop ringing, play a decline sound, prompt the user with: "the call has been declined" ...) @@ -36,7 +36,7 @@ the proposed solution. ### Proposal (Changes) -This MSC Proposes to extend the `m.rtc.notification` with a new `notification_type`, a new relation and a new `decline_reason` +This MSC Proposes the `m.rtc.notification.decline` event type, with a relation and a `decline_reason` field. - relation: `"m.relates_to": {"rel_type":"m.rtc.decline", "eventId":"$call_notify_event_id"}` @@ -46,8 +46,6 @@ field. "decline_reason"?: "decline description" ``` -- decline type: `notification_type: "decline" | "ring" | "notify"` - The `m.relates_to` field allows to reference the original notify event. The optional reason allows to provide a message to the user receiving the decline. the `notification_type` from the `m.rtc.notification` event gets a new case. The decline case. @@ -62,10 +60,6 @@ the call by ringing others ... ## Potential issues -Since this is reusing the `m.rtc.notification` event type which did not have this usecase in mind, -the event type name might be a bit off: -Instead of calling it`m.rtc.notification`, `m.rtc.signalling` might be more approprita. - ### Alternatives There are other formats in which the decline relation could be formatted: @@ -84,15 +78,18 @@ Use already existing reactions to the notify event. This makes it extremely triv - Might collide with already existing reaction logic in clients - Hard to include into an rtc member based timeline rendering -#### Custom Event +#### Reusing the existing `m.rtc.notification` event + +Reusing the `m.rtc.notification` event type which did not have this usecase in mind, +the event type name might be a bit off. -Introduce a new custom event and a new reaction type. This custom event will be sent as a reaction to the initial notify event: - Pros ✅ - - clear separation and usecase + - using the same event type does not need new widget permissions. And no additional + event types would need to be introduced in js-sdk and rust sdk. - Cons ❌ - - new event needs new widget permissions and more event types introduced in js-sdk and rust sdk + - There would be no a clear separation and usecase. ## Security considerations