|
| 1 | +# MSC3818: Copy room type on upgrade |
| 2 | + |
| 3 | +Unless the room upgrade API specifies that room type must be copied over, clients cannot rely on |
| 4 | +rooms staying the same type leading to trouble. |
| 5 | + |
| 6 | + |
| 7 | +## Proposal |
| 8 | + |
| 9 | +This MSC proposes that the room upgade API MUST copy the [room type](https://spec.matrix.org/v1.2/client-server-api/#types) |
| 10 | +over to the new room. Otherwise clients cannot trust that to happen and [Spaces](https://spec.matrix.org/v1.2/client-server-api/#spaces) |
| 11 | +or [MSC3588](https://github.com/matrix-org/matrix-spec-proposals/pull/3588) Story rooms may incorrectly become |
| 12 | +normal rooms breaking user-experience. |
| 13 | + |
| 14 | +The Spec currently specfies this in [section 11.32.3. server behaviour](https://spec.matrix.org/v1.2/client-server-api/#server-behaviour-16): |
| 15 | + |
| 16 | +> 2. Creates a replacement room with a `m.room.create` event containing a `predecessor` field and the applicable `room_version`. |
| 17 | +
|
| 18 | +It becomes: |
| 19 | + |
| 20 | +> 2. Creates a replacement room with a `m.room.create` event containing a `predecessor` field, a |
| 21 | +> `type` field set to what it was in the previous room (if it was set), and the applicable `room_version`. |
| 22 | +
|
| 23 | + |
| 24 | +## Potential issues |
| 25 | + |
| 26 | +Some room types such as Spaces also require copying over state events as a part of the update progress, |
| 27 | +in case of Spaces, `m.space.child` events. However as that can be changed later and done by the client, |
| 28 | +it's out of scope for this MSC. |
| 29 | + |
| 30 | +## Alternatives |
| 31 | + |
| 32 | +A suggested alternative is having every room type specify their own update process if they use other |
| 33 | +room types. However this would complicate the MSC process with even simple client-side proposals |
| 34 | +requiring also a server-side implementation. This could also result in room types dependent on a |
| 35 | +particular server software or discourage using Matrix for a smaller project where an MSC wasn't |
| 36 | +otherwise consider necessary. |
| 37 | + |
| 38 | +## Security considerations |
| 39 | + |
| 40 | +Non-applicable. |
| 41 | + |
| 42 | +## Unstable prefix |
| 43 | + |
| 44 | +Non-applicable. |
| 45 | + |
| 46 | +## Dependencies |
| 47 | + |
| 48 | +Non-applicable. |
0 commit comments