Function auth_types_for_event

Source
pub fn auth_types_for_event(
    event_type: &TimelineEventType,
    sender: &UserId,
    state_key: Option<&str>,
    content: &RawValue,
    rules: &AuthorizationRules,
) -> Result<Vec<(StateEventType, String)>, String>
Available on crate feature state-res only.
Expand description

Get the list of [relevant auth event types] required to authorize the event of the given type.

Returns a list of (event_type, state_key) tuples.

§Errors

Returns an Err(_) if a field could not be deserialized because content does not respect the expected format for the event_type.