Fix membership state table and diagram (#3730)
* Fix membership state table and diagram There were 2 missing cases which are legal: * `invite->knock` (a fairly silly thing to do, but legal under the auth rules) * `external->leave (via /kick)` (another somewhat silly thing to do, but no different than `external->ban (via /ban)`) The state table considered the first as illegal, which is untrue. * Changelog * Make the graph prettier * Update changelogs/client_server/newsfragments/3730.clarification Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
b6f2b172a6
commit
fd2340a4da
4 changed files with 10 additions and 9 deletions
|
@ -31,13 +31,13 @@ description: |-
|
|||
from the `prev_content` object on an event. If not present, the user's previous membership must be assumed
|
||||
as `leave`.
|
||||
|
||||
| | to `invite` | to `join` | to `leave` | to `ban` | to `knock` |
|
||||
|-------------------|----------------------|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|--------------------|
|
||||
| **from `invite`** | No change. | User joined the room. | If the `state_key` is the same as the `sender`, the user rejected the invite. Otherwise, the `state_key` user had their invite revoked. | User was banned. | Must never happen. |
|
||||
| **from `join`** | Must never happen. | `displayname` or `avatar_url` changed. | If the `state_key` is the same as the `sender`, the user left. Otherwise, the `state_key` user was kicked. | User was kicked and banned. | Must never happen. |
|
||||
| **from `leave`** | New invitation sent. | User joined. | No change. | User was banned. | User is knocking. |
|
||||
| **from `ban`** | Must never happen. | Must never happen. | User was unbanned. | No change. | Must never happen. |
|
||||
| **from `knock`** | Knock accepted. | Must never happen. | If the `state_key` is the same as the `sender`, the user retracted the knock. Otherwise, the `state_key` user had their knock denied. | User was banned. | No change. |
|
||||
| | to `invite` | to `join` | to `leave` | to `ban` | to `knock` |
|
||||
|-------------------|----------------------|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|----------------------|
|
||||
| **from `invite`** | No change. | User joined the room. | If the `state_key` is the same as the `sender`, the user rejected the invite. Otherwise, the `state_key` user had their invite revoked. | User was banned. | User is re-knocking. |
|
||||
| **from `join`** | Must never happen. | `displayname` or `avatar_url` changed. | If the `state_key` is the same as the `sender`, the user left. Otherwise, the `state_key` user was kicked. | User was kicked and banned. | Must never happen. |
|
||||
| **from `leave`** | New invitation sent. | User joined. | No change. | User was banned. | User is knocking. |
|
||||
| **from `ban`** | Must never happen. | Must never happen. | User was unbanned. | No change. | Must never happen. |
|
||||
| **from `knock`** | Knock accepted. | Must never happen. | If the `state_key` is the same as the `sender`, the user retracted the knock. Otherwise, the `state_key` user had their knock denied. | User was banned. | No change. |
|
||||
|
||||
properties:
|
||||
content:
|
||||
|
@ -72,7 +72,7 @@ properties:
|
|||
|
||||
Client and server implementations should be aware of the [signing implications](/rooms/v8/#authorization-rules) of including this
|
||||
field in further events: in particular, the event must be signed by the server which
|
||||
owns the user ID in the field. When copying the membership event's `content`
|
||||
owns the user ID in the field. When copying the membership event's `content`
|
||||
(for profile updates and similar) it is therefore encouraged to exclude this
|
||||
field in the copy, as otherwise the event might fail event authorization.
|
||||
reason:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue