matrix-spec/data/event-schemas/schema/m.room.create.yaml
Travis Ralston f97d2944ae
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
Room version 12 (#2193)
* Placeholder

* i++

* Room version 12

Template out a v12 room version

Make v12 default, per MSC4304

Update PDU checks and auth event selection per MSC4291

Describe new room_id format per MSC4291

Move v6 depth definition to a component for easier referencing

Move room_id to a component to prep for v12, per MSC4291

Create and use a new room_id component for v12+ per MSC4291

Reflect auth events selection change onto all room versions per MSC4291

The MSC asks the `description` of `auth_events` to be adjusted, however this feels like a better representation of the change.

Add `room_id` format rules and renumber per MSC4291

Reflect change to rule 1.2 per MSC4291

Insert same room_id check to v1-12 auth rules per MSC4307 and MSC4291

Deprecate `predecessor.event_id` per MSC4291

Insert auth rule to validate `additional_creators` per MSC4289

Insert rule for `users` validation of creators and renumber per MSC4289

Define "room creator(s)" per MSC4289

Spec `additional_creators` on create events per MSC4289

Spec `additional_creators` on `/upgrade` per MSC4289

The MSC doesn't mention how to handle unsupported room versions, but the Synapse implementation used for FCP ignores the field in such room versions. This feels like a good approach, and will need clarifying in the MSC too (if accepted at the spec level).

Add notes to `/upgrade` behaviour per MSC4289 and MSC4291

Describe how additional creators work during room creation per MSC4289

Fix default user power level descriptions per MSC4289

Describe tombstone power level changes per MSC4289

Warn clients about event format changes in v12 per MSC4289 and MSC4291

Flag additional room creators support for client reference per MSC4289

Remove TODO now that it's fully addressed

Copy state res into v12 as-is for modification

Apply Modification 1 to SR2.1 per MSC4297

Apply Modification 2 to SR2.1 per MSC4297

Add summary box to the top of SR2.1 for ease of developer reference

Modification 2 was split into items 2 and 3 for further ease of understanding.

Add all the changelogs

`x` is used until a real PR number can be assigned.

Some changelogs are duplicated to the Client-Server API to increase visibility of the changes to v12.

Review: Minor phrasing adjustments in changelogs

Review: Clarify that v12 isn't quite the default yet in the changelog

Review: Clarify to clients that creators are immutable

Review: Improve 'how to parse a domain' advice for legacy apps

Review: Add a bit more detail as to why a room ID might be required

Apply suggestions from code review

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>

Clarify that clients can override the tombstone default

Mention creatorship UI label by finishing the Permissions section

We probably should have removed the WIP note in v1.0, but alas.

Add changelog for tombstone changes

Use assigned spec PR number in changelogs

(cherry picked from commit ec81eea7e4532fd398b8013071d6981c97117d9e)
2025-08-14 11:16:00 -06:00

77 lines
3.1 KiB
YAML

---
allOf:
- $ref: core-event-schema/state_event.yaml
description: This is the first event in a room and cannot be changed. It acts as the root of all other events.
properties:
content:
properties:
creator:
description: |-
The `user_id` of the room creator. **Required** for, and only present in, room versions 1 - 10. Starting with
room version 11 the event `sender` should be used instead.
type: string
m.federate:
description: Whether users on other servers can join this room. Defaults to `true` if key does not exist.
type: boolean
room_version:
description: The version of the room. Defaults to `"1"` if the key does not exist.
type: string
type:
description: |-
Optional [room type](/client-server-api/#types) to denote a room's intended function outside of traditional
conversation.
Unspecified room types are possible using [Namespaced Identifiers](/appendices/#common-namespaced-identifier-grammar).
type: string
predecessor:
description: A reference to the room this room replaces, if the previous room was upgraded.
type: object
title: Previous Room
properties:
room_id:
type: string
description: The ID of the old room.
event_id:
type: string
deprecated: true
x-changedInMatrixVersion:
"1.16": |-
This field became deprecated and may not be present in all cases. It SHOULD still
be populated where possible/practical. Previously, it was required.
description: |-
The event ID of the last known event in the old room, if known.
If not set, clients SHOULD search for the `m.room.tombstone` state event to navigate to
when directing the user to the old room (potentially after joining the room, if requested
by the user).
required: [room_id]
additional_creators:
type: array
items:
type: string
description: Additional user ID to consider a creator of the room, if supported by the room version.
x-addedInMatrixVersion: "1.16"
description: |-
Starting with room version 12, the other user IDs to consider as creators for the room in
addition to the `sender` of this event. Each string MUST be a valid [user ID](/appendices#user-identifiers)
for the room version.
When not present or empty, the `sender` of the event is the only creator.
In room versions 1 through 11, this field serves no purpose and is not validated. Clients
SHOULD NOT attempt to parse or understand this field in these room versions.
**Note**: Because `creator` was removed in room version 11, the field is not used to determine
which user(s) are room creators in room version 12 and beyond either.
type: object
state_key:
description: A zero-length string.
pattern: '^$'
type: string
type:
enum:
- m.room.create
type: string
title: The first event in the room.
type: object