Module ruma_state_res::event_auth [−][src]
Functions
Authenticate the incoming event
. The steps of authentication are:
For the given event kind
what are the relevant auth events
that are needed to authenticate this content
.
Can this room federate based on its m.room.create event.
Is the user allowed to send a specific event based on the rooms power levels. Does the event have the correct userId as it’s state_key if it’s not the “” state_key.
Check user can send invite.
Is the event’s sender in the room that they sent the event to.
Check that the member event matches state
.
Confirm that the event sender has the required power levels.
Does the event redacting come from a user with enough power to redact the given event.
Helper function to fetch a field, name
, from a “m.room.power_level” event’s content.
or return default
if no power level event is found or zero if no field matches name
.
Helper function to fetch the power level needed to send an event of type
e_type
based on the rooms “m.room.power_level” event.
Helper function to fetch a users default power level from a “m.room.power_level” event’s users
object.
Does the user who sent this member event have required power levels to do so.