file names

Signed-off-by: Timo K <toger5@hotmail.de>
toger5/matrixRTC-call-decline
Timo K 3 months ago
parent 7489bbbd39
commit a4905590a4

@ -7,7 +7,7 @@
viewBox="0 0 133.16223 135.95966"
version="1.1"
id="svg1"
sodipodi:docname="4310-matrixRTC-call-decline-realtions.svg"
sodipodi:docname="4310-matrixRTC-call-decline-relations.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"
@ -89,16 +89,6 @@
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
sodipodi:role="line"
id="tspan11"
x="18.564566"
y="61.062046" /></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:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke-width:0.4;stroke-opacity:0.972549"
@ -117,19 +107,19 @@
sodipodi:role="line"
x="14.100647"
y="71.187935"
id="tspan20"> &quot;notification_type&quot;: &quot;ring&quot;,</tspan><tspan
id="tspan20"> "notification_type": "ring",</tspan><tspan
sodipodi:role="line"
x="14.100647"
y="75.705177"
id="tspan21"> &quot;m.relates_to&quot;: {</tspan><tspan
id="tspan21"> "m.relates_to": {</tspan><tspan
sodipodi:role="line"
x="14.100647"
y="80.222412"
id="tspan22"> &quot;rel_type&quot;: &quot;m.reference&quot;,</tspan><tspan
id="tspan22"> "rel_type": "m.reference",</tspan><tspan
sodipodi:role="line"
x="14.100647"
y="84.739655"
id="tspan23"> &quot;event_id&quot;: &quot;$initial_member_id&quot;,</tspan><tspan
id="tspan23"> "event_id": "$initial_member_id",</tspan><tspan
sodipodi:role="line"
x="14.100647"
y="89.256897"
@ -153,7 +143,7 @@
x="13.680081"
y="114.1185"
style="font-weight:bold"
dx="0 0 0 0">m.rtc.notification.decline</tspan><tspan
dx="0 0 0 0">m.rtc.decline</tspan><tspan
sodipodi:role="line"
id="tspan19-9"
x="13.680081"
@ -161,19 +151,19 @@
sodipodi:role="line"
x="13.680081"
y="123.15298"
id="tspan20-3"> &quot;reason: &quot;some reason&quot;</tspan><tspan
id="tspan20-3"> "reason": "some reason",</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="127.67022"
id="tspan21-4"> &quot;m.relates_to&quot;: {</tspan><tspan
id="tspan21-4"> "m.relates_to": {</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="132.18745"
id="tspan22-0"> &quot;rel_type&quot;: &quot;m.reference&quot;,</tspan><tspan
id="tspan22-0"> "rel_type": "m.reference",</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="136.7047"
id="tspan23-7"> &quot;event_id&quot;: &quot;$initial_ring_event_id&quot;,</tspan><tspan
id="tspan23-7"> "event_id": "$initial_ring_event_id",</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="141.22194"
@ -208,16 +198,5 @@
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" />
<text
xml:space="preserve"
style="font-size:2.82223px;line-height:1;font-family:Inter;-inkscape-font-specification:Inter;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:3.42601;stroke-linecap:round;stroke-linejoin:round"
x="22.818089"
y="63.35442"
id="text13"><tspan
sodipodi:role="line"
id="tspan13"
style="stroke-width:3.426"
x="22.818089"
y="63.35442" /></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

@ -0,0 +1,150 @@
# MSC4310: MatrixRTC decline `m.rtc.notification`
MatrixRTC is the base layer that defines how devices participate in a call. For the specific
use case of a voice/video call we need additional signaling (outside of MatrixRTC) to provide
the expected user experience.
It is important to understand that this (and related) proposals intentionally decouple RTC-specific
signaling 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),
which introduces 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 an event, sent as a relation to the
`m.rtc.notification` event, which communicates a decline from one or more
parties. It can be used on 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.rtc.notification` event and ideally even
the **MatrixRTC session** to check if the decline 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 the `m.rtc.decline` event type, with a standard `m.reference`
relation and a `reason` field.
- relation: `"m.relates_to": {"rel_type": "m.reference", "event_id": "$call_notification_event_id"}`
- reason:
```json
"reason"?: "decline description"
```
The `m.relates_to` field allows referencing the original `m.rtc.notification` event.
The optional reason can provide a message to the user receiving the decline.
This results in a tree of notification/decline events related to the
`m.rtc.member` events for the corresponding session.
![matrixRTC-call-decline-relations](./4310-matrixRTC-call-decline-relations.svg)
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 declined the call and who (can be multiple) started
the call by ringing others ...
### Example
Unencrypted (stable) example:
```json5
{
"type": "m.rtc.decline", // "org.matrix.msc4310.rtc.decline"
"content": {
"m.relates_to": {
"rel_type": "m.reference",
"event_id": "$call_notification_event_id"
},
"reason": "Busy"
}
}
```
Client handling guidance:
- For 1:1 rings, on receipt of a decline, stop ringing and show a declined state.
- For group rings, on receipt of a decline from a participant, update that
participants state. The ring should continue until at least one participant
accepts or all have declined/timeout.
- Ignore declines which do not relate to a known `m.rtc.notification` event,
or where the sender is not a targeted/mentioned recipient of that
notification.
- If the user has since joined the MatrixRTC session (per `m.rtc.member`),
declines for the corresponding notification can be ignored.
- Decline events SHOULD NOT mention users and SHOULD NOT trigger push
notifications by default.
## Potential issues
### Alternatives
There are other formats in which the decline relation could be represented:
#### Reaction
Use already existing reactions to the notification 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.
- In encrypted rooms, reactions are unencrypted.
- Does not allow for more custom fields (decline call later, decline "Out Of Office",
decline "in meeting")
- Might collide with already existing reaction logic in clients
- Hard to include into an rtc member based timeline rendering
#### Reusing the existing `m.rtc.notification` event
Reusing the `m.rtc.notification` event type which did not have this use case in mind,
the event type name might be a bit off.
This custom event will be sent as a reaction to the initial notify event:
- Pros ✅
- Using the same event type does not need new widget permissions, and no additional
event types would need to be introduced in SDKs.
- Cons ❌
- There would be no clear separation of concerns, and the semantics would be muddled.
## Security considerations
Relations are unencrypted and might make it possible to guess a decline because the
original state event is unencrypted.
## Unstable prefix
While this is an open proposal, the prefix `org.matrix.msc4310.rtc.decline` **MUST**
be used for the new event type. When referencing an unstable
`m.rtc.notification` from MSC4075, use the appropriate unstable prefix from
that MSC.
## Dependencies
This MSC builds on [MSC4075](https://github.com/matrix-org/matrix-spec-proposals/pull/4075)
Loading…
Cancel
Save