mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 13:04:10 +01:00
improve documentation of ephemeral events
This commit is contained in:
parent
1cdfbd3cd8
commit
38290cfc32
|
|
@ -1521,7 +1521,7 @@ any given point in time:
|
||||||
|
|
||||||
### Types of room events
|
### Types of room events
|
||||||
|
|
||||||
Room events are split into two categories:
|
Room events are split into three categories:
|
||||||
|
|
||||||
* **State events**: These are events which update the metadata state of the room (e.g. room
|
* **State events**: These are events which update the metadata state of the room (e.g. room
|
||||||
topic, room membership etc). State is keyed by a tuple of event `type`
|
topic, room membership etc). State is keyed by a tuple of event `type`
|
||||||
|
|
@ -1532,6 +1532,12 @@ overwritten.
|
||||||
typically communication such as sending an instant message or setting up
|
typically communication such as sending an instant message or setting up
|
||||||
a VoIP call.
|
a VoIP call.
|
||||||
|
|
||||||
|
* **Ephemeral events**: These are events which are not persisted in the room's
|
||||||
|
timeline. In this version of the spec, these are [typing
|
||||||
|
notification](#typing-notifications) and [read receipt](#receipts) events. Note
|
||||||
|
that, unlike state events and message events, there is currently no way of
|
||||||
|
defining custom ephemeral events.
|
||||||
|
|
||||||
This specification outlines several events, all with the event type
|
This specification outlines several events, all with the event type
|
||||||
prefix `m.`. (See [Room Events](#room-events) for the m. event
|
prefix `m.`. (See [Room Events](#room-events) for the m. event
|
||||||
specification.) However, applications may wish to add their own type of
|
specification.) However, applications may wish to add their own type of
|
||||||
|
|
@ -1559,7 +1565,9 @@ in [room version 1](/rooms/v1#event-format) and [room version
|
||||||
|
|
||||||
However, it is unusual that a Matrix client would encounter this event
|
However, it is unusual that a Matrix client would encounter this event
|
||||||
format. Instead, homeservers are responsible for converting events into the
|
format. Instead, homeservers are responsible for converting events into the
|
||||||
format shown below so that they can be easily parsed by clients.
|
format shown below so that they can be easily parsed by clients. Note that the
|
||||||
|
format below only applies to state and message events; ephemeral events will
|
||||||
|
only have the `type` and `content` properties.
|
||||||
|
|
||||||
{{% boxes/warning %}}
|
{{% boxes/warning %}}
|
||||||
Event bodies are considered untrusted data. This means that any application using
|
Event bodies are considered untrusted data. This means that any application using
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,7 @@ properties:
|
||||||
ephemeral:
|
ephemeral:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: room_event_filter.yaml
|
- $ref: room_event_filter.yaml
|
||||||
description: The events that aren't recorded in the room history, e.g. typing
|
description: The ephemeral events to include for rooms.
|
||||||
and receipts, to include for rooms.
|
|
||||||
include_leave:
|
include_leave:
|
||||||
description: Include rooms that the user has left in the sync, default false
|
description: Include rooms that the user has left in the sync, default false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
|
||||||
|
|
@ -219,9 +219,7 @@ paths:
|
||||||
title: Ephemeral
|
title: Ephemeral
|
||||||
type: object
|
type: object
|
||||||
description: |-
|
description: |-
|
||||||
The ephemeral events in the room that aren't
|
The new ephemeral events in the room.
|
||||||
recorded in the timeline or state of the room.
|
|
||||||
e.g. typing.
|
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "definitions/event_batch.yaml"
|
- $ref: "definitions/event_batch.yaml"
|
||||||
account_data:
|
account_data:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue