diff --git a/crates/ruma-common/src/events/room/power_levels.rs b/crates/ruma-common/src/events/room/power_levels.rs index 514a7a23..44d7931e 100644 --- a/crates/ruma-common/src/events/room/power_levels.rs +++ b/crates/ruma-common/src/events/room/power_levels.rs @@ -191,6 +191,13 @@ impl SyncRoomPowerLevelsEvent { } } +impl StrippedRoomPowerLevelsEvent { + /// Obtain the effective power levels from this event. + pub fn power_levels(&self) -> RoomPowerLevels { + self.content.clone().into() + } +} + /// The effective power levels of a room. /// /// This struct contains the same fields as [`RoomPowerLevelsEventContent`] and be created from that