Function ruma::state_res::event_auth::valid_membership_change [−][src]
pub fn valid_membership_change<E>(
state_key: &str,
user_sender: &UserId,
content: Value,
prev_event: Option<Arc<E>>,
current_third_party_invite: Option<Arc<E>>,
auth_events: &BTreeMap<(EventType, String), Arc<E>>
) -> Result<bool, Error> where
E: Event,
This is supported on crate feature
state-res
only.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.