Use A(E) and B(E) for state after/before events

A suggestion to mitigate #774.
This commit is contained in:
David Robertson 2022-04-29 16:15:31 +01:00
parent 614680675f
commit f10fdbc009
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD
2 changed files with 12 additions and 12 deletions

View file

@ -2,17 +2,17 @@
toc_hide: true toc_hide: true
--- ---
The room state *S*(*E*) after an event *E* is defined in terms of the The room state *A*(*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 room state *B*(*E*) before *E*, and depends on whether *E* is a state
event or a message event: event or a message event:
- If *E* is a message event, then *S*(*E*)=*S*(*E*). - If *E* is a message event, then *A*(*E*)=*B*(*E*).
- If *E* is a state event, then *S*(*E*) is *S*(*E*), except that its - 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 entry corresponding to *E*'s `event_type` and `state_key` is
replaced by *E*'s `event_id`. replaced by *E*'s `event_id`.
The room state *S*(*E*) before *E* is the *resolution* of the set of The room state *B*(*E*) before *E* is the *resolution* of the set of
states {*S*(*E*<sub>1</sub>),*S*(*E*<sub>2</sub>), …} consisting of states {*A*(*E*<sub>1</sub>),*A*(*E*<sub>2</sub>), …} consisting of
the states after each of *E*'s `prev_event`s 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 {*E*<sub>1</sub>,*E*<sub>2</sub>, …}, where the resolution of a set of
states is given in the algorithm below. states is given in the algorithm below.

View file

@ -66,17 +66,17 @@ This is fixed in the state resolution algorithm introduced in room
version 2. version 2.
{{% /boxes/warning %}} {{% /boxes/warning %}}
The room state *S*(*E*) after an event *E* is defined in terms of the The room state *A*(*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 room state *B*(*E*) before *E*, and depends on whether *E* is a state
event or a message event: event or a message event:
- If *E* is a message event, then *S*(*E*)=*S*(*E*). - If *E* is a message event, then *A*(*E*)=*B*(*E*).
- If *E* is a state event, then *S*(*E*) is *S*(*E*), except that its - 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 entry corresponding to *E*'s `event_type` and `state_key` is
replaced by *E*'s `event_id`. replaced by *E*'s `event_id`.
The room state *S*(*E*) before *E* is the *resolution* of the set of The room state *B*(*E*) before *E* is the *resolution* of the set of
states {*S*(*E*),*S*(*E*″), …} consisting of the states after each states {*A*(*E*),*A*(*E*″), …} consisting of the states after each
of *E*'s `prev_event`s {*E*,*E*″, …}. of *E*'s `prev_event`s {*E*,*E*″, …}.
The *resolution* of a set of states is defined as follows. The resolved The *resolution* of a set of states is defined as follows. The resolved