pub fn check_auth(event: &LeanEvent, state: &RoomState) -> Result<(), AuthError>Expand description
Check whether event is authorized given the room state at its prev_events.
This implements the core Matrix authorization rules:
m.room.createmust be the first event (no prev_events).- Sender must be a joined member (unless joining/being invited).
- Sender must not be banned.
- Sender’s power level must meet the event type requirement.
- For
m.room.memberevents, the state_key must match transition rules.