Move common voip events to the content, not the actual event

This commit is contained in:
David Baker 2023-05-17 14:43:18 +01:00
parent 5d53d67efe
commit ffa0a6f13b
8 changed files with 28 additions and 12 deletions

View file

@ -1,7 +1,5 @@
allOf:
- "$ref": room_event.yaml
description: "All call events share a set of common fields: those of room events
and some additional VoIP specific fields."
description: "The content of all call events shares a set of common fields: those
of room events and some additional VoIP specific fields."
properties:
call_id:
type: string
@ -17,7 +15,7 @@ properties:
type: string
description: 'This identifies the party that sent this event. A client may
choose to re-use the device ID from end-to-end cryptography for the value
of this field. '
of this field.'
required:
- call_id
- version

View file

@ -2,11 +2,14 @@
"type": "object",
"description": "This event is sent by the callee when they wish to answer the call.",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
}],
"properties": {
"answer": {
"type": "object",

View file

@ -2,11 +2,14 @@
"type": "object",
"description": "This event is sent by callers after sending an invite and by the callee after answering. Its purpose is to give the other party additional ICE candidates to try using to communicate.",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
}],
"properties": {
"candidates": {
"type": "array",

View file

@ -22,10 +22,12 @@ description: |
* `unknown_error`: Some other failure occurred that meant the client was unable to continue the call
rather than the user choosing to end it.
allOf:
- "$ref": core-event-schema/call_event.yaml
- "$ref": core-event-schema/room_event.yaml
properties:
content:
type: object
allOf:
- "$ref": core-event-schema/call_event.yaml
properties:
reason:
type: string

View file

@ -2,11 +2,14 @@
"type": "object",
"description": "This event is sent by the caller when they wish to establish a call.",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
}],
"properties": {
"offer": {
"type": "object",

View file

@ -34,10 +34,12 @@ description: |
attempt to validate the `type` field, but simply pass the object into the
WebRTC API.
allOf:
- "$ref": core-event-schema/call_event.yaml
- "$ref": core-event-schema/room_event.yaml
properties:
content:
type: object
allOf:
- "$ref": core-event-schema/call_event.yaml
properties:
offer:
type: object

View file

@ -13,10 +13,12 @@ description: |
The meanings of the `reason` codes are the same as in [`m.call.hangup`](#mcallhangup).
allOf:
- "$ref": core-event-schema/call_event.yaml
- "$ref": core-event-schema/room_event.yaml
properties:
content:
type: object
allOf:
- "$ref": core-event-schema/call_event.yaml
properties:
reason:
type: string

View file

@ -2,11 +2,14 @@
"type": "object",
"description": "This event is sent by the caller's client once it has decided which other client to talk to, by selecting one of multiple possible incoming `m.call.answer` events. Its `selected_party_id` field indicates the answer it's chosen. The `call_id` and `party_id` of the caller is also included. If the callee's client sees a `select_answer` for an answer with party ID other than the one it sent, it ends the call and informs the user the call was answered elsewhere. It does not send any events. Media can start flowing before this event is seen or even sent. Clients that implement previous versions of this specification will ignore this event and behave as they did before.",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"allOf": [{
"$ref": "core-event-schema/call_event.yaml"
}],
"properties": {
"selected_party_id": {
"type": "string",