Opinionated: improve def of the closest event to e

``iteratively descending through the `m.room.power_levels` events in the
`auth_events`-starting at *e*.`` was also unclear to me. Unfortunately
this is now more symbol-dense and I'm not sure if it's a net improvement.
This commit is contained in:
David Robertson 2022-06-01 15:25:43 +01:00
parent 45440197de
commit e2d8cfcfd7
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD

View file

@ -90,11 +90,13 @@ event in its `auth_events`.
The *mainline of P*<sub>0</sub> is the list of events The *mainline of P*<sub>0</sub> is the list of events
[*P*<sub>n</sub> , ... , *P*<sub>1</sub>, *P*<sub>0</sub>]. [*P*<sub>n</sub> , ... , *P*<sub>1</sub>, *P*<sub>0</sub>].
Given another event *e*, the *closest mainline event to* Given another event *e* = *e<sub>0</sub>* we can compute a similar list of
*e* is the first event encountered in the mainline when iteratively `m.room.power_level` events
descending through the `m.room.power_levels` events in the `auth_events` [*e*<sub>0</sub>, *e*<sub>1</sub>, ...],
starting at *e*. If no mainline event is encountered when iteratively where *e<sub>*j* + 1</sub>* is the `m.room.power_levels` event in the
descending through the `m.room.power_levels` events, then the closest `auth_events` of *e<sub>j</sub>*. The *closest mainline event to e*
is the first event *e<sub>j</sub>* which belongs to the mainline of *P*.
If no event *e<sub>j</sub>* belongs to the mainline of *P*, then the closest
mainline event to *e* can be considered to be a dummy event that is mainline event to *e* can be considered to be a dummy event that is
before any other event in the mainline of *P* for the purposes of before any other event in the mainline of *P* for the purposes of
condition 1 below. condition 1 below.