|
|
|
---
|
|
|
|
title: Room Version 4
|
|
|
|
type: docs
|
|
|
|
weight: 40
|
|
|
|
version: 4
|
|
|
|
---
|
|
|
|
|
|
|
|
This room version builds on [version 3](/rooms/v3) using a different
|
|
|
|
encoding for event IDs.
|
|
|
|
|
|
|
|
## Client considerations
|
|
|
|
|
|
|
|
This room version changes the format form event IDs sent to clients.
|
|
|
|
Clients should already be treating event IDs as opaque identifiers, and
|
|
|
|
should not be concerned with the format of them. Clients should still
|
|
|
|
encode the event ID when including it in a request path.
|
|
|
|
|
|
|
|
Clients should expect to see event IDs changed from the format of
|
|
|
|
`$randomstring:example.org` to something like
|
|
|
|
`$Rqnc-F-dvnEYJTyHq_iKxU2bZ1CI92-kuZq3a5lr5Zg` (note the lack of
|
|
|
|
domain).
|
|
|
|
|
|
|
|
Though unchanged in this room version, clients which implement the
|
|
|
|
redaction algorithm locally should refer to the [redactions](#redactions)
|
|
|
|
section below for a full overview.
|
|
|
|
|
|
|
|
## Server implementation components
|
|
|
|
|
|
|
|
{{% boxes/warning %}}
|
|
|
|
The information contained in this section is strictly for server
|
|
|
|
implementors. Applications which use the Client-Server API are generally
|
|
|
|
unaffected by the intricacies contained here. The section above
|
|
|
|
regarding client considerations is the resource that Client-Server API
|
|
|
|
use cases should reference.
|
|
|
|
{{% /boxes/warning %}}
|
|
|
|
|
|
|
|
Room version 4 uses the same algorithms defined in [room version
|
|
|
|
3](/rooms/v3), however using URL-safe base64 to generate the event ID.
|
|
|
|
|
|
|
|
### Event IDs
|
|
|
|
|
|
|
|
{{% boxes/rationale %}}
|
|
|
|
Room version 3 generated event IDs that were difficult for client
|
|
|
|
implementations which were not encoding the event ID to function in
|
|
|
|
those rooms. It additionally raised concern due to the `/` character
|
|
|
|
being interpreted differently by some reverse proxy software, and
|
|
|
|
generally made administration harder.
|
|
|
|
{{% /boxes/rationale %}}
|
|
|
|
|
|
|
|
{{% rver-fragment name="v4-event-ids" %}}
|
|
|
|
|
|
|
|
## Unchanged from v3
|
|
|
|
|
|
|
|
The following sections have not been modified since v3, but are included for
|
|
|
|
completeness.
|
|
|
|
|
|
|
|
### Redactions
|
|
|
|
|
|
|
|
{{% rver-fragment name="v1-redactions" %}}
|
|
|
|
|
|
|
|
### Handling redactions
|
|
|
|
|
|
|
|
{{% rver-fragment name="v3-handling-redactions" %}}
|
|
|
|
|
|
|
|
### Event format
|
|
|
|
|
|
|
|
The event format is the same as [room version 3](/rooms/v3#event-format),
|
|
|
|
however the event IDs in the following example are updated to reflect
|
|
|
|
the changes in this room version.
|
|
|
|
|
|
|
|
{{% rver-fragment name="v4-event-format" %}}
|
|
|
|
|
|
|
|
#### Deprecated event content schemas
|
|
|
|
|
|
|
|
{{% rver-fragment name="v1-deprecated-formatting-off-spec" %}}
|
|
|
|
|
|
|
|
{{% rver-fragment name="v1-stringy-power-levels" %}}
|
|
|
|
|
|
|
|
### Authorization rules
|
|
|
|
|
|
|
|
{{% rver-fragment name="v3-auth-rules" %}}
|
|
|
|
|
|
|
|
### State resolution
|
|
|
|
|
|
|
|
{{% rver-fragment name="v2-state-res" %}}
|
|
|
|
|
|
|
|
### Canonical JSON
|
|
|
|
|
|
|
|
{{% rver-fragment name="v1-canonical-json" %}}
|