Update MSC to match how room versions work

As per 1773.
This commit is contained in:
Travis Ralston 2019-01-22 18:24:04 -07:00
parent 853d7ede30
commit 50eba23669

View file

@ -3,7 +3,7 @@
Currently clients need to guess at which room versions the server supports, if any. This is particularly Currently clients need to guess at which room versions the server supports, if any. This is particularly
difficult to do as it generally requires knowing the state of the ecosystem and what versions are difficult to do as it generally requires knowing the state of the ecosystem and what versions are
available and how keen users are to upgrade their servers and clients. The impossible judgement call available and how keen users are to upgrade their servers and clients. The impossible judgement call
for when to prompt people to upgrade shouldn't be impossible, or even a judgement call. for when to encourage people to upgrade shouldn't be impossible, or even a judgement call.
## Proposal ## Proposal
@ -16,37 +16,27 @@ this proposal suggests a `m.room_versions` capability be introduced like the fol
{ {
"capabilities": { "capabilities": {
"m.room_versions": { "m.room_versions": {
"m.development": ["state-res-v2-test", "event-ids-as-hashes-test", "3"], "default": "1",
"m.beta": ["2"], "available": {
"m.default": "1", "1": "stable",
"m.recommended": "1", "2": "stable",
"m.mandatory": ["1"] "state-res-v2-test": "unstable",
"event-ids-as-hashes": "unstable",
"3": "unstable"
}
} }
} }
} }
``` ```
The labels picked (`m.development`, etc) are based upon the categories for different room versions.
Note that `m.default` and `m.recommended` reinforce that there is exactly 1 version in each category.
Clients are encouraged to make use of this capability to determine if the server supports a given Clients are encouraged to make use of this capability to determine if the server supports a given
version, and at what state. version, and at what level of stability.
Clients should prompt people with sufficient permissions to perform an upgrade to upgrade their rooms The default version is the version that the server is using to create new rooms with. Clients can
to the `m.recommended` room version. make the assumption that the default version is a stable version.
Room versions might appear under multiple categories under some circumstances. In particular, it is Clients should encourage people with sufficient permissions to perform an upgrade to upgrade their
expected that anything in `m.development` or `m.beta` appears exactly once in the whole capability rooms to the `default` room version when the room is using an `unstable` version.
whereas `m.default`, `m.recommended`, and `m.mandatory` may duplicate a room version. The duplication
is possible due to the definitions of each category:
* `m.default` - This is the room version that the server is going to apply to all new rooms by default.
* `m.recommended` - The version clients should be prompting people to upgrade to.
* `m.mandatory` - The version the server is going to enforce on all pre-existing rooms.
With these definitions, it is possible that a room version fits multiple criteria (ie: "please upgrade
your rooms to version X which is also the default for new rooms"). Clients will generally only be
interested in the `m.recommended` room version, leaving the rest as informational for users.
## Potential issues ## Potential issues