make decline a new event type

Signed-off-by: Timo K <toger5@hotmail.de>
toger5/matrixRTC-call-decline
Timo K 3 months ago
parent a2d86366b7
commit 1315cb08f5

@ -7,8 +7,31 @@
viewBox="0 0 133.16223 135.95966" viewBox="0 0 133.16223 135.95966"
version="1.1" version="1.1"
id="svg1" 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="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="1.7318196"
inkscape:cx="298.24123"
inkscape:cy="264.46173"
inkscape:window-width="2056"
inkscape:window-height="1257"
inkscape:window-x="0"
inkscape:window-y="44"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs <defs
id="defs1"> id="defs1">
<marker <marker
@ -72,84 +95,93 @@
x="18.564566" x="18.564566"
y="61.062046" y="61.062046"
id="text1-1"><tspan id="text1-1"><tspan
id="tspan1-5" sodipodi:role="line"
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" id="tspan11"
x="18.564566" x="18.564566"
y="61.062046">m.call.notify</tspan><tspan y="61.062046" /></text>
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 <text
xml:space="preserve" 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" 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"
x="15.176634" x="14.100647"
y="112.12274" y="62.153454"
id="text10"><tspan id="text10"><tspan
id="tspan6" sodipodi:role="line"
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" id="tspan18"
x="15.176634" x="14.100647"
y="112.12274">m.call.notify</tspan><tspan y="62.153454"
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" style="font-weight:bold">m.rtc.notification</tspan><tspan
x="15.176634" sodipodi:role="line"
y="117.0104" id="tspan19"
id="tspan7">{</tspan><tspan x="14.100647"
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" y="66.670692">{</tspan><tspan
x="15.176634" sodipodi:role="line"
y="121.89805" x="14.100647"
id="tspan8"> &quot;notify_type&quot;: &quot;decline&quot;</tspan><tspan y="71.187935"
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" id="tspan20"> &quot;notification_type&quot;: &quot;ring&quot;,</tspan><tspan
x="15.176634" sodipodi:role="line"
y="126.78571" x="14.100647"
id="tspan16"> &quot;m.relates_to&quot;: {</tspan><tspan y="75.705177"
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" id="tspan21"> &quot;m.relates_to&quot;: {</tspan><tspan
x="15.176634" sodipodi:role="line"
y="131.67336" x="14.100647"
id="tspan17"> &quot;rel_type&quot;: &quot;m.call.notification&quot;,</tspan><tspan y="80.222412"
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" id="tspan22"> &quot;rel_type&quot;: &quot;m.call.notification&quot;,</tspan><tspan
x="15.176634" sodipodi:role="line"
y="136.561" x="14.100647"
id="tspan18"> &quot;event_id&quot;: &quot;$initial_ring_event_id&quot;,</tspan><tspan y="84.739655"
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" id="tspan23"> &quot;event_id&quot;: &quot;$initial_member_id&quot;,</tspan><tspan
x="15.176634" sodipodi:role="line"
y="141.44867" x="14.100647"
id="tspan19"> }</tspan><tspan y="89.256897"
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" id="tspan24"> }</tspan><tspan
x="15.176634" sodipodi:role="line"
y="146.33632" x="14.100647"
id="tspan9"> ...</tspan><tspan y="93.774132"
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" id="tspan25"> ...</tspan><tspan
x="15.176634" sodipodi:role="line"
y="151.22397" x="14.100647"
id="tspan10">}</tspan></text> y="98.291374"
id="tspan26">}</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:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke-width:0.4;stroke-opacity:0.972549"
x="13.680081"
y="114.1185"
id="text10-9"><tspan
sodipodi:role="line"
id="tspan18-0"
x="13.680081"
y="114.1185"
style="font-weight:bold"
dx="0 0 0 0">m.rtc.notification.decline</tspan><tspan
sodipodi:role="line"
id="tspan19-9"
x="13.680081"
y="118.63574">{</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="123.15298"
id="tspan20-3"> &quot;decline_reason: &quot;some reason&quot;</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="127.67022"
id="tspan21-4"> &quot;m.relates_to&quot;: {</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="132.18745"
id="tspan22-0"> &quot;rel_type&quot;: &quot;m.rtc.decline&quot;,</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
sodipodi:role="line"
x="13.680081"
y="141.22194"
id="tspan25-7"> }</tspan><tspan
sodipodi:role="line"
x="13.680081"
y="145.73918"
id="tspan26-5">}</tspan></text>
<rect <rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549" style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549"
id="rect19" id="rect19"
@ -176,5 +208,16 @@
style="opacity:1;fill:none;fill-opacity:1;stroke:#ffbe6f;stroke-width:0.4;stroke-opacity:0.972549;marker-end:url(#RoundedArrow)" 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" d="m 108.37848,134.54422 c 20.33348,-7.45561 12.91952,-31.96274 6.1417,-38.401674"
id="path21" /> 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> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

@ -10,13 +10,13 @@ signalling and general purpose MatrixRTC session state.
## Context ## Context
This proposal builds on the concept of [MSC4075: MatrixRTC Call Ringing](https://github.com/matrix-org/matrix-spec-proposals/pull/4075) 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. 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. The receiving clients will then monitor the room state and stop ringing once the user joined with one of their devices.
## Proposal ## 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 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" ...) 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) ### 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. field.
- relation: `"m.relates_to": {"rel_type":"m.rtc.decline", "eventId":"$call_notify_event_id"}` - relation: `"m.relates_to": {"rel_type":"m.rtc.decline", "eventId":"$call_notify_event_id"}`
@ -46,8 +46,6 @@ field.
"decline_reason"?: "decline description" "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 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. 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. 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 ## 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 ### Alternatives
There are other formats in which the decline relation could be formatted: 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 - Might collide with already existing reaction logic in clients
- Hard to include into an rtc member based timeline rendering - 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: This custom event will be sent as a reaction to the initial notify event:
- Pros ✅ - 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 ❌ - 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 ## Security considerations

Loading…
Cancel
Save