ruma::state_res

Function auth_types_for_event

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

For the given event kind what are the relevant auth events that are needed to authenticate this content.

ยงErrors

This function will return an error if the supplied content is not a JSON object.