Initial draft

toger5/matrixRTC-call-decline
Timo 5 months ago
parent 5beaf2e7a7
commit 99366b90ad

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="133.16223mm"
height="135.95966mm"
viewBox="0 0 133.16223 135.95966"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<marker
style="overflow:visible"
id="marker22"
refX="0"
refY="0"
orient="auto-start-reverse"
markerWidth="1"
markerHeight="1"
viewBox="0 0 1 1"
preserveAspectRatio="xMidYMid">
<path
transform="scale(0.7)"
d="m -0.21114562,-4.1055728 6.42229122,3.21114561 a 1,1 90 0 1 0,1.78885438 L -0.21114562,4.1055728 A 1.236068,1.236068 31.717474 0 1 -2,3 v -6 a 1.236068,1.236068 148.28253 0 1 1.78885438,-1.1055728 z"
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
id="path22" />
</marker>
<marker
style="overflow:visible"
id="RoundedArrow"
refX="0"
refY="0"
orient="auto-start-reverse"
markerWidth="1"
markerHeight="1"
viewBox="0 0 1 1"
preserveAspectRatio="xMidYMid">
<path
transform="scale(0.7)"
d="m -0.21114562,-4.1055728 6.42229122,3.21114561 a 1,1 90 0 1 0,1.78885438 L -0.21114562,4.1055728 A 1.236068,1.236068 31.717474 0 1 -2,3 v -6 a 1.236068,1.236068 148.28253 0 1 1.78885438,-1.1055728 z"
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
id="path8" />
</marker>
</defs>
<g
id="layer1"
transform="translate(5.4889936,-19.321178)">
<rect
style="opacity:1;fill:#99c1f1;fill-opacity:1;stroke-width:0.4;stroke-opacity:0.972549"
id="rect1"
width="133.16223"
height="32.02956"
x="-5.4889936"
y="19.321178"
rx="10"
ry="10" />
<text
xml:space="preserve"
style="font-size:7.02215px;line-height:1;font-family:'TeX Gyre Schola';-inkscape-font-specification:'TeX Gyre Schola';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;opacity:1;fill:#000000;stroke-width:0.4;stroke-opacity:0.972549"
x="61.095631"
y="37.983307"
id="text1"><tspan
id="tspan1"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="61.095631"
y="37.983307">m.rtc.member</tspan></text>
<text
xml:space="preserve"
style="font-size:4.51724px;line-height:1;font-family:'TeX Gyre Schola';-inkscape-font-specification:'TeX Gyre Schola';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.4;stroke-opacity:0.972549"
x="18.564566"
y="61.062046"
id="text1-1"><tspan
id="tspan1-5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="61.062046">m.call.notify</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="65.949699"
id="tspan2">{</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="70.837357"
id="tspan3"> &quot;notify_type&quot;: &quot;ring&quot;</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="75.725006"
id="tspan4"> &quot;m.relates_to&quot;: {</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="80.612663"
id="tspan12"> &quot;rel_type&quot;: &quot;m.call.notification&quot;,</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="85.500313"
id="tspan14"> &quot;event_id&quot;: &quot;$state_event_id&quot;,</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="90.38797"
id="tspan15"> }</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="95.27562"
id="tspan11"> ...</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="18.564566"
y="100.16328"
id="tspan5">}</tspan></text>
<text
xml:space="preserve"
style="font-size:4.51724px;line-height:1;font-family:'TeX Gyre Schola';-inkscape-font-specification:'TeX Gyre Schola';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;stroke-width:0.4;stroke-opacity:0.972549"
x="15.176634"
y="112.12274"
id="text10"><tspan
id="tspan6"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="112.12274">m.call.notify</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="117.0104"
id="tspan7">{</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="121.89805"
id="tspan8"> &quot;notify_type&quot;: &quot;decline&quot;</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="126.78571"
id="tspan16"> &quot;m.relates_to&quot;: {</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="131.67336"
id="tspan17"> &quot;rel_type&quot;: &quot;m.call.notification&quot;,</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="136.561"
id="tspan18"> &quot;event_id&quot;: &quot;$initial_ring_event_id&quot;,</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="141.44867"
id="tspan19"> }</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="146.33632"
id="tspan9"> ...</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Noto Sans Mono CJK HK';-inkscape-font-specification:'Noto Sans Mono CJK HK';text-align:start;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke-width:0.4"
x="15.176634"
y="151.22397"
id="tspan10">}</tspan></text>
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549"
id="rect19"
width="106.08814"
height="48.376209"
x="8.0480509"
y="54.317131"
ry="10"
rx="10" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549"
id="rect20"
width="106.08814"
height="48.376209"
x="8.0480509"
y="106.70462"
ry="10"
rx="10" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549;marker-end:url(#marker22)"
d="m 96.03539,83.728545 c 33.21135,-7.116718 28.27098,-26.070992 25.22096,-31.832143"
id="path20" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549;marker-end:url(#RoundedArrow)"
d="m 108.37848,134.54422 c 20.33348,-7.45561 12.91952,-31.96274 6.1417,-38.401674"
id="path21" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

@ -0,0 +1,107 @@
# MSXXXX: MatrixRTC decline `m.rtc.notify`
MatrixRTC is the base layer that defines how devices participate in a call. For the specific
usecase of a voice/video call we need additional signalling (outside of MatrixRTC) to provide
the expected user experience.
It is important to understand that this (and related) proposals intentionally detangle rtc specific
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.call.notify` 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 event that will be sent as a relation to the `m.call.notify` 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" ...)
### Introduction
While the concept of this proposal is simple it is important to outline what needs to be achievable with
the proposed solution.
- A client needs to easily react to such an event and needs to be able to **correlate the decline** with a
`m.call.notify` event and best case even the **MatrixRTC session** to check if the declien is relevant.
- It needs to be **flexible for 1:1 calls and group calls**. It should be possible to design a group ring
and per group participant decline flow with this proposal even if some products might not need this feature.
- Clients have two possible ways of displaying **historic calls in the timeline**. They can compute the exact call
history using the `m.rtc.member` events which contain the information at what time, which device joined.
Alternatively they can use the notify and decline events only to render when a person tried to start a call
and if that got declined. This is much simpler and therefore desired for very simple client implementations.
### Proposal (Changes)
This MSC Proposes to extend the `m.call.notify` event with two more properties and a new `notify_type` :
- relation: `"m.relates_to": {"rel_type":"m.decline", "eventId":"$call_notify_event_id"}`
- reason:
```json
"decline_reason"?: "decline description"
```
- decline type: `notify_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 `notify_type` from the `m.call.notify` event gets a new case. The decline case.
This results in a tree of notify events on `m.rtc.member` events.
<img src="./XXXX-matrixRTC-call-decline-realtions.svg" width=400 alt="matrixRTC-call-decline-relations"/>
Fetching the `m.rtc.member` events to compute a timeline item summarizing the call allows to easily get all the
related elements and provide additional context in the timeline tile. If a call was declined, who (can be multiple) started
the call by ringing others ...
## Potential issues
Since this is reusing the `m.call.notify` event type which did not have this usecase in mind,
the event type name might be a bit off:
Instead of calling it`m.call.notify`, `m.call.signalling` might be more approprita.
### Alternatives
There are other formats in which the decline relation could be formatted:
#### Reaction
Use already existing reactions to the notify event. This makes it extremely trivial to implement:
- Pros ✅
- All clients already have support.
- The timeline rendering already has access to the reaction and can incorporate this into the custom tile rendering.
- Cons ❌
- Feels hacky
- Will be unencrypted as reactions
- Does not allow for more custom fields (decline call later, decline ooo, decline in meeting)
- Might collide with already existing reaction logic in clients
- Hard to include into an rtc member based timeline rendering
#### Custom Event
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
- Cons ❌
- new event needs new widget permissions and more event types introduced in js-sdk and rust sdk
## Security considerations
Relations are unencrypted and the custom relation type will leak metadata about call notify and deline events.
## Unstable prefix
While this is an open proposal the prefix `org.matrix.mscXXXX.decline` needs to be used for the new relation type
(and the `m.call.notify` event type will use the `org.matrix.msc4075.call.notify` prefixed version as described in [MSC4075](https://github.com/matrix-org/matrix-spec-proposals/pull/4075))
## Dependencies
This MSC builds on [MSC4075](https://github.com/matrix-org/matrix-spec-proposals/pull/4075)
Loading…
Cancel
Save