Skip to main content

is_power_event

Function is_power_event 

Source
pub(super) fn is_power_event<Pdu>(event: &Pdu) -> bool
where Pdu: Event,
Expand description

Whether the given event is a power event.

Definition in the spec:

A power event is a state event with type m.room.power_levels or m.room.join_rules, or a state event with type m.room.member where the membership is leave or ban and the sender does not match the state_key. The idea behind this is that power events are events that might remove someone’s ability to do something in the room.

m.room.create is included in the match below, extending the spec definition to match Synapse and Ruma.