Function ruma_state_res::source ·
pub fn auth_check<E: Event>( room_version: &RoomVersion, incoming_event: impl Event, current_third_party_invite: Option<impl Event>, fetch_state: impl Fn(&StateEventType, &str) -> Option<E> ) -> Result<bool>
Authenticate the incoming
The steps of authentication are:
- check that the event is being authenticated for the correct room
- then there are checks for specific event types
fetch_state closure should gather state from a state snapshot. We need to know if the
event passes auth against some state not a recursive collection of auth_events fields.