mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 19:44:09 +01:00
Use A(E) and B(E) for state after/before events
A suggestion to mitigate #774.
This commit is contained in:
parent
614680675f
commit
f10fdbc009
|
|
@ -2,17 +2,17 @@
|
|||
toc_hide: true
|
||||
---
|
||||
|
||||
The room state *S*′(*E*) after an event *E* is defined in terms of the
|
||||
room state *S*(*E*) before *E*, and depends on whether *E* is a state
|
||||
The room state *A*(*E*) after an event *E* is defined in terms of the
|
||||
room state *B*(*E*) before *E*, and depends on whether *E* is a state
|
||||
event or a message event:
|
||||
|
||||
- If *E* is a message event, then *S*′(*E*) = *S*(*E*).
|
||||
- If *E* is a state event, then *S*′(*E*) is *S*(*E*), except that its
|
||||
- If *E* is a message event, then *A*(*E*) = *B*(*E*).
|
||||
- If *E* is a state event, then *A*(*E*) is *B*(*E*), except that its
|
||||
entry corresponding to *E*'s `event_type` and `state_key` is
|
||||
replaced by *E*'s `event_id`.
|
||||
|
||||
The room state *S*(*E*) before *E* is the *resolution* of the set of
|
||||
states {*S*′(*E*<sub>1</sub>), *S*′(*E*<sub>2</sub>), …} consisting of
|
||||
The room state *B*(*E*) before *E* is the *resolution* of the set of
|
||||
states {*A*(*E*<sub>1</sub>), *A*(*E*<sub>2</sub>), …} consisting of
|
||||
the states after each of *E*'s `prev_event`s
|
||||
{*E*<sub>1</sub>, *E*<sub>2</sub>, …}, where the resolution of a set of
|
||||
states is given in the algorithm below.
|
||||
|
|
|
|||
|
|
@ -66,17 +66,17 @@ This is fixed in the state resolution algorithm introduced in room
|
|||
version 2.
|
||||
{{% /boxes/warning %}}
|
||||
|
||||
The room state *S*′(*E*) after an event *E* is defined in terms of the
|
||||
room state *S*(*E*) before *E*, and depends on whether *E* is a state
|
||||
The room state *A*(*E*) after an event *E* is defined in terms of the
|
||||
room state *B*(*E*) before *E*, and depends on whether *E* is a state
|
||||
event or a message event:
|
||||
|
||||
- If *E* is a message event, then *S*′(*E*) = *S*(*E*).
|
||||
- If *E* is a state event, then *S*′(*E*) is *S*(*E*), except that its
|
||||
- If *E* is a message event, then *A*(*E*) = *B*(*E*).
|
||||
- If *E* is a state event, then *A*(*E*) is *B*(*E*), except that its
|
||||
entry corresponding to *E*'s `event_type` and `state_key` is
|
||||
replaced by *E*'s `event_id`.
|
||||
|
||||
The room state *S*(*E*) before *E* is the *resolution* of the set of
|
||||
states {*S*′(*E*′), *S*′(*E*″), …} consisting of the states after each
|
||||
The room state *B*(*E*) before *E* is the *resolution* of the set of
|
||||
states {*A*(*E*′), *A*(*E*″), …} consisting of the states after each
|
||||
of *E*'s `prev_event`s {*E*′, *E*″, …}.
|
||||
|
||||
The *resolution* of a set of states is defined as follows. The resolved
|
||||
|
|
|
|||
Loading…
Reference in a new issue