mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-02 17:54:09 +01:00
Merge pull request #1074 from Magnap/auth-no-depth
Modify event auth rules not to rely on depth
This commit is contained in:
commit
fb9f7ccf41
|
|
@ -504,15 +504,15 @@ the state of the room.
|
||||||
state of the room. For example, a redacted ``join`` event will still
|
state of the room. For example, a redacted ``join`` event will still
|
||||||
result in the user being considered joined.
|
result in the user being considered joined.
|
||||||
|
|
||||||
1. If type is ``m.room.create``, allow if and only if has depth 0 and it has no
|
1. If type is ``m.room.create``, allow if and only if it has no
|
||||||
previous events - *i.e.* it is the first event in the room.
|
previous events - *i.e.* it is the first event in the room.
|
||||||
|
|
||||||
#. If type is ``m.room.member``:
|
#. If type is ``m.room.member``:
|
||||||
|
|
||||||
a. If ``membership`` is ``join``:
|
a. If ``membership`` is ``join``:
|
||||||
|
|
||||||
i. If the previous event in the room graph is an ``m.room.create``, the
|
i. If the only previous event is an ``m.room.create``
|
||||||
depth is 1 and the ``state_key`` is the creator, allow.
|
and the ``state_key`` is the creator, allow.
|
||||||
|
|
||||||
#. If the ``sender`` does not match ``state_key``, reject.
|
#. If the ``sender`` does not match ``state_key``, reject.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue