From a91030f27bf6b54f9fd32c38a653c0881070c0f4 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 31 May 2022 09:24:25 -0600 Subject: [PATCH] Re-add paragraph about how some state keys are reserved (#1100) * Re-add paragraph about how some state keys are reserved Fixes https://github.com/matrix-org/matrix-spec/issues/1013 * changelog --- changelogs/client_server/newsfragments/1100.clarification | 1 + .../definitions/client_event_without_room_id.yaml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/client_server/newsfragments/1100.clarification diff --git a/changelogs/client_server/newsfragments/1100.clarification b/changelogs/client_server/newsfragments/1100.clarification new file mode 100644 index 00000000..e17a2538 --- /dev/null +++ b/changelogs/client_server/newsfragments/1100.clarification @@ -0,0 +1 @@ +Clarify that state keys starting with `@` are in fact reserved. Regressed from [#3658](https://github.com/matrix-org/matrix-spec-proposals/pull/3658). \ No newline at end of file diff --git a/data/api/client-server/definitions/client_event_without_room_id.yaml b/data/api/client-server/definitions/client_event_without_room_id.yaml index 1b6d6073..c4db8b0e 100644 --- a/data/api/client-server/definitions/client_event_without_room_id.yaml +++ b/data/api/client-server/definitions/client_event_without_room_id.yaml @@ -38,6 +38,10 @@ properties: Present if, and only if, this event is a *state* event. The key making this piece of state unique in the room. Note that it is often an empty string. + + State keys starting with an `@` are reserved for referencing user IDs, such + as room members. With the exception of a few events, state events set with a + given user's ID as the state key MUST only be set by that user. type: string example: '@user:example.org' sender: