Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Travis Ralston 2022-06-07 11:38:42 -06:00 committed by GitHub
parent 290fa16ca3
commit 1653b43cde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

@ -1 +1 @@
Clarifies the historical handling of non-integer power levels. Clarify the historical handling of non-integer power levels.

View file

@ -2,7 +2,7 @@
toc_hide: true toc_hide: true
--- ---
##### Power levels accepted as strings ##### `m.room.power_levels` events accept values as strings
In order to maintain backwards compatibility with early implementations, In order to maintain backwards compatibility with early implementations,
power levels can optionally be represented in string format instead of power levels can optionally be represented in string format instead of
@ -10,7 +10,7 @@ integer format. A homeserver must be prepared to deal with this by parsing
the power level from a string. In these cases, the following formatting of the the power level from a string. In these cases, the following formatting of the
power level string is allowed: power level string is allowed:
* a single Base10 integer, no float values or decimal points, optionally with * a single base 10 integer, no float values or decimal points, optionally with
any number of leading zeroes (`"100"`, `"000100"`); any number of leading zeroes (`"100"`, `"000100"`);
* optionally with any number of leading or trailing whitespace characters (`" 100 "`, * optionally with any number of leading or trailing whitespace characters (`" 100 "`,
`" 00100 "`); `" 00100 "`);
@ -19,6 +19,6 @@ power level string is allowed:
`"-100"`). `"-100"`).
{{% boxes/note %}} {{% boxes/note %}}
The integer represented by the string must still be within the `[-2^53, 2^53)` The integer represented by the string must still be within the `[-(2**53)+1, (2**53)-1]`
range accepted by normal, non-string, power level values. range accepted by normal, non-string, power level values.
{{% /boxes/note %}} {{% /boxes/note %}}

View file

@ -41,12 +41,12 @@ use cases should reference.
{{% /boxes/warning %}} {{% /boxes/warning %}}
[Room version 7](/rooms/v7) added "knocking" and [room version 8](/rooms/v8) [Room version 7](/rooms/v7) added "knocking" and [room version 8](/rooms/v8)
added "join restrictions" (refined by [room version 9](/rooms/v9)) - both allow added "join restrictions" (refined by [room version 9](/rooms/v9)) both allow
prospective members an avenue to join, however both could not be used at the prospective members an avenue to join, however it was not possible to use
same time due to how the join rules work. This room version adds a new the two mechanisms together. This room version adds a new
`knock_restricted` join rule as a mix of the two behaviours, allowing a user to `knock_restricted` join rule as a mix of the two behaviours, allowing a user to
join the room if they meet either the `restricted` join rule criteria or the join the room if they meet either the `restricted` join rule criteria or the
`knock` join rule criteria - whichever function they're attempting to use. `knock` join rule criteria.
This room version additionally requires that values in the power levels event This room version additionally requires that values in the power levels event
be integers and not string representations, unlike other room versions. be integers and not string representations, unlike other room versions.
@ -63,7 +63,7 @@ for details on the current event format.
While this room version does not change the event format specifically, some While this room version does not change the event format specifically, some
deprecated behaviours are strictly no longer supported. deprecated behaviours are strictly no longer supported.
##### Power levels must be integers ##### Values in `m.room.power_levels` events must be integers
In other room versions, such as [v9](/rooms/v9/#power-levels-accepted-as-strings), In other room versions, such as [v9](/rooms/v9/#power-levels-accepted-as-strings),
power levels could be represented as strings for backwards compatibility. power levels could be represented as strings for backwards compatibility.

View file

@ -17,7 +17,7 @@ Clients which implement the redaction algorithm locally should refer to the
### Redactions ### Redactions
{{% added-in this=true %}} `m.room.member` now keep `join_authorised_via_users_server` {{% added-in this=true %}} `m.room.member` events now keep `join_authorised_via_users_server`
in addition to other keys in `content` when being redacted. in addition to other keys in `content` when being redacted.
{{% rver-fragment name="v9-redactions" %}} {{% rver-fragment name="v9-redactions" %}}