Skip to content

Commit

Permalink
Remove 'room_id' field from m.typing, m.receipt and `m.fully_read…
Browse files Browse the repository at this point in the history
…` examples and schema (matrix-org#3679)

The spec had an erroneous `room_id` field in a m.typing EDU entry of /sync, `m.read` receipts in `/sync`, and `m.fully_read` room account data objects in the spec. None of these are necessary nor used in practice.

Checking part of the ecosystem for whether clients look for, or homeservers include, these room_id fields, I found that:

    Element does not require them, nor does Synapse include them.
    Ruma does not include them.
    Dendrite does not include them.
    nheko/mtxclient does not look for them.

This change removes room_id from the example and OpenAPI schema in each case mentioned above. It only affects the Client-Server spec - the Server-Server spec text remains unchanged.

The field was initially introduced in 0f28f83.
  • Loading branch information
anoadragon453 authored and turt2live committed May 9, 2022
1 parent c657932 commit 8a5955e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/3679.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove erroneous `room_id` field from examples of `m.read`, `m.typing` in `/sync` and `m.fully_read` in room account data.
3 changes: 1 addition & 2 deletions data/event-schemas/examples/core/room_edu.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"$ref": "event.json",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
"$ref": "event.json"
}
1 change: 0 additions & 1 deletion data/event-schemas/examples/m.fully_read.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$ref": "core/event.json",
"type": "m.fully_read",
"room_id": "!somewhere:example.org",
"content": {
"event_id": "$someplace:example.org"
}
Expand Down
6 changes: 1 addition & 5 deletions data/event-schemas/schema/m.fully_read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
"type": {
"type": "string",
"enum": ["m.fully_read"]
},
"room_id": {
"type": "string",
"description": "The room ID the read marker applies to."
}
},
"required": ["type", "room_id", "content"]
"required": ["type", "content"]
}
5 changes: 1 addition & 4 deletions data/event-schemas/schema/m.receipt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@
"type": {
"type": "string",
"enum": ["m.receipt"]
},
"room_id": {
"type": "string"
}
},
"required": ["room_id", "type", "content"]
"required": ["type", "content"]
}
5 changes: 1 addition & 4 deletions data/event-schemas/schema/m.typing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"type": {
"type": "string",
"enum": ["m.typing"]
},
"room_id": {
"type": "string"
}
},
"required": ["type", "room_id", "content"]
"required": ["type", "content"]
}

0 comments on commit 8a5955e

Please sign in to comment.