Compare commits

...

5 commits

Author SHA1 Message Date
Kévin Commaille c30dab648f
Merge 2e0dcad0b4 into 7fd49a2808 2025-03-21 16:05:42 +00:00
Kévin Commaille 7fd49a2808
Set room version 11 as the default (#2105)
Some checks failed
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled
* Set room version 11 as the default

As per MSC4239

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-20 12:00:33 -06:00
Kévin Commaille 2e0dcad0b4
Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-02-21 17:07:38 +01:00
Kévin Commaille 6640e192fd
Fix the m.room.member.yaml example
This is a `join` event, and the `sender` doesn't match the `state_key`, so the event couldn't pass the authorization rules.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-02-21 16:51:18 +01:00
Kévin Commaille 2243f836dd
Fix sync example
The same event should not appear in `state` and in the `timeline` so we cannot use the same event twice.

To provide a `state` example we assume that with lazy-loading the user did not get the state event for `@example:example.org`, so we add one since they sent a message in the timeline.

The events that are referenced include a `room_id`, which doesn't appear on this endpoint, so we copy them without it.

Finally, the `join` event of `@alice:example.org` is wrong because the sender does not match the state key, which wouldn't pass the authorization rules.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-02-21 16:50:26 +01:00
5 changed files with 47 additions and 4 deletions

View file

@ -0,0 +1 @@
Fix the example of the `GET /sync` endpoint and the `m.room.member` example used in several places.

View file

@ -0,0 +1 @@
Update the default room version to 11, as per [MSC4239](https://github.com/matrix-org/matrix-spec-proposals/pull/4239).

View file

@ -52,7 +52,7 @@ stable and unstable periodically for a variety of reasons, including
discovered security vulnerabilities and age. discovered security vulnerabilities and age.
Clients should not ask room administrators to upgrade their rooms if the Clients should not ask room administrators to upgrade their rooms if the
room is running a stable version. Servers SHOULD use **room version 10** as room is running a stable version. Servers SHOULD use **room version 11** as
the default room version when creating new rooms. the default room version when creating new rooms.
The available room versions are: The available room versions are:

View file

@ -441,17 +441,57 @@ paths:
"state": { "state": {
"events": [ "events": [
{ {
"$ref": "../../event-schemas/examples/m.room.member.yaml" "content": {
"avatar_url": "mxc://example.org/SFHyPlCeYUSFFxlgbQYZmoEoe",
"displayname": "Example user",
"membership": "join"
},
"event_id": "$143273976499sgjks:example.org",
"origin_server_ts": 1432735824653,
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"age": 45603,
"membership": "join"
}
} }
] ]
}, },
"timeline": { "timeline": {
"events": [ "events": [
{ {
"$ref": "../../event-schemas/examples/m.room.member.yaml" "content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"membership": "join",
"reason": "Looking for support"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"sender": "@alice:example.org",
"state_key": "@alice:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234,
"membership": "join"
}
}, },
{ {
"$ref": "../../event-schemas/examples/m.room.message$m.text.yaml" "content": {
"body": "This is an example text message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example text message</b>",
"msgtype": "m.text"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1234,
"membership": "join"
}
} }
], ],
"limited": true, "limited": true,

View file

@ -1,6 +1,7 @@
{ {
"$ref": "core/state_event.json", "$ref": "core/state_event.json",
"state_key": "@alice:example.org", "state_key": "@alice:example.org",
"sender": "@alice:example.org",
"type": "m.room.member", "type": "m.room.member",
"content": { "content": {
"membership": "join", "membership": "join",