Reorganize event structure in c2s spec and clarify event capabilities
Fixes https://github.com/matrix-org/matrix-doc/issues/1166 Fixes https://github.com/matrix-org/matrix-doc/issues/1527 Fixes https://github.com/matrix-org/matrix-doc/issues/1827 Note: In order to fix the "state events have the following fields: [no words]" bug (1827) we need to resolve references on common event types. When doing this we ultimately end up with more fields than may be required to explain the section, however this commit alters the section descriptions to just say "these fields" instead of "these additional fields". This is also preferable over trying to get the inheritance reversed in the common event types, as the `/sync` endpoint has a high amount of reliance on partial events definitions.pull/977/head
parent
9ac89cc915
commit
8fd5b15594
@ -0,0 +1 @@
|
|||||||
|
Reorganize information about events into a common section.
|
@ -1,7 +1,6 @@
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: room_event.yaml
|
- $ref: room_event.yaml
|
||||||
- $ref: sync_state_event.yaml
|
- $ref: sync_state_event.yaml
|
||||||
description: In addition to the Room Event fields, State Events have the following
|
description: State Events have the following fields.
|
||||||
additional fields.
|
|
||||||
title: State Event
|
title: State Event
|
||||||
type: object
|
type: object
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
.. Copyright 2016 OpenMarket Ltd
|
|
||||||
..
|
|
||||||
.. Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
.. you may not use this file except in compliance with the License.
|
|
||||||
.. You may obtain a copy of the License at
|
|
||||||
..
|
|
||||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
..
|
|
||||||
.. Unless required by applicable law or agreed to in writing, software
|
|
||||||
.. distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
.. See the License for the specific language governing permissions and
|
|
||||||
.. limitations under the License.
|
|
||||||
|
|
||||||
Event Structure
|
|
||||||
===============
|
|
||||||
|
|
||||||
All communication in Matrix is expressed in the form of data objects called
|
|
||||||
Events. These are the fundamental building blocks common to the client-server,
|
|
||||||
server-server and application-service APIs, and are described below.
|
|
||||||
|
|
||||||
Note that the structure of these events may be different than those in the
|
|
||||||
server-server API.
|
|
||||||
|
|
||||||
{{common_event_fields}}
|
|
||||||
|
|
||||||
{{common_room_event_fields}}
|
|
||||||
|
|
||||||
{{common_state_event_fields}}
|
|
||||||
|
|
||||||
|
|
||||||
Size limits
|
|
||||||
-----------
|
|
||||||
|
|
||||||
The complete event MUST NOT be larger than 65535 bytes, when formatted as a
|
|
||||||
`PDU for the Server-Server protocol <../server_server/%SERVER_RELEASE_LABEL%#pdus>`_,
|
|
||||||
including any signatures, and encoded as `Canonical JSON`_.
|
|
||||||
|
|
||||||
There are additional restrictions on sizes per key:
|
|
||||||
|
|
||||||
- ``sender`` MUST NOT exceed 255 bytes (including domain).
|
|
||||||
- ``room_id`` MUST NOT exceed 255 bytes.
|
|
||||||
- ``state_key`` MUST NOT exceed 255 bytes.
|
|
||||||
- ``type`` MUST NOT exceed 255 bytes.
|
|
||||||
- ``event_id`` MUST NOT exceed 255 bytes.
|
|
||||||
|
|
||||||
Some event types have additional size restrictions which are specified in
|
|
||||||
the description of the event. Additional keys have no limit other than that
|
|
||||||
implied by the total 65 KB limit on events.
|
|
||||||
|
|
||||||
Room Events
|
|
||||||
-----------
|
|
||||||
.. NOTE::
|
|
||||||
This section is a work in progress.
|
|
||||||
|
|
||||||
This specification outlines several standard event types, all of which are
|
|
||||||
prefixed with ``m.``
|
|
||||||
|
|
||||||
{{m_room_aliases_event}}
|
|
||||||
|
|
||||||
{{m_room_canonical_alias_event}}
|
|
||||||
|
|
||||||
{{m_room_create_event}}
|
|
||||||
|
|
||||||
{{m_room_join_rules_event}}
|
|
||||||
|
|
||||||
{{m_room_member_event}}
|
|
||||||
|
|
||||||
{{m_room_power_levels_event}}
|
|
||||||
|
|
||||||
{{m_room_redaction_event}}
|
|
||||||
|
|
||||||
.. _`Canonical JSON`: ../appendices.html#canonical-json
|
|
Loading…
Reference in New Issue