Function ruma_state_res::event_auth::valid_membership_change [−][src]
pub fn valid_membership_change<E, F>(
state_key: &str,
user_sender: &UserId,
content: Value,
prev_event: Option<Arc<E>>,
current_third_party_invite: Option<Arc<E>>,
fetch_state: F
) -> Result<bool> where
E: Event,
F: Fn(&EventType, &str) -> Option<Arc<E>>,
Expand description
Does the user who sent this member event have required power levels to do so.
user
- Information about the membership event and user making the request.prev_event
- The event that occurred immediately before theuser
event or None.auth_events
- The set of auth events that relate to a membership event. this is generated by callingauth_types_for_event
with the membership event and the current State.