From efef3412a0278d1dff714a8fe9c157369e4db2ff Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 27 Aug 2018 19:07:32 -0600 Subject: [PATCH] Take out the underscore restriction from state events It's not needed anymore, and we should remove it while we're in the area. Includes other misc changes to the schema layout. --- .../schema/core-event-schema/state_event.yaml | 14 +------------- .../schema/core-event-schema/sync_room_event.yaml | 3 +-- .../schema/core-event-schema/sync_state_event.yaml | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/event-schemas/schema/core-event-schema/state_event.yaml b/event-schemas/schema/core-event-schema/state_event.yaml index 020e9087..37d4426f 100644 --- a/event-schemas/schema/core-event-schema/state_event.yaml +++ b/event-schemas/schema/core-event-schema/state_event.yaml @@ -1,19 +1,7 @@ allOf: - $ref: room_event.yaml +- $ref: sync_state_event.yaml description: In addition to the Room Event fields, State Events have the following additional fields. -properties: - prev_content: - description: Optional. The previous ``content`` for this event. If there is no - previous content, this key will be missing. - title: EventContent - type: object - state_key: - description: A unique key which defines the overwriting semantics for this piece - of room state. This value is often a zero-length string. The presence of this - key makes this event a State Event. The key MUST NOT start with '_'. - type: string -required: -- state_key title: State Event type: object diff --git a/event-schemas/schema/core-event-schema/sync_room_event.yaml b/event-schemas/schema/core-event-schema/sync_room_event.yaml index 300dfb2b..fbbf154f 100644 --- a/event-schemas/schema/core-event-schema/sync_room_event.yaml +++ b/event-schemas/schema/core-event-schema/sync_room_event.yaml @@ -26,8 +26,7 @@ properties: description: The globally unique event identifier. type: string sender: - description: Contains the fully-qualified ID of the user who *sent* - this event. + description: Contains the fully-qualified ID of the user who sent this event. type: string origin_server_ts: description: Timestamp in milliseconds on originating homeserver diff --git a/event-schemas/schema/core-event-schema/sync_state_event.yaml b/event-schemas/schema/core-event-schema/sync_state_event.yaml index a073caac..30af9698 100644 --- a/event-schemas/schema/core-event-schema/sync_state_event.yaml +++ b/event-schemas/schema/core-event-schema/sync_state_event.yaml @@ -27,7 +27,7 @@ properties: state_key: description: A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this - key makes this event a State Event. The key MUST NOT start with '_'. + key makes this event a State Event. type: string required: - state_key