Skip to content

Commit

Permalink
refactor(room): remove sdk::Room::room_power_levels function
Browse files Browse the repository at this point in the history
This has been replaced by `sdk_base::Room::power_levels`, which can also be used from `sdk::Room`
  • Loading branch information
jmartinesp committed Oct 29, 2024
1 parent 846d413 commit c97b36a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crates/matrix-sdk/src/room/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2163,16 +2163,6 @@ impl Room {
Ok(())
}

/// Get the current power levels of this room.
pub async fn room_power_levels(&self) -> Result<RoomPowerLevels> {
Ok(self
.get_state_event_static::<RoomPowerLevelsEventContent>()
.await?
.ok_or(Error::InsufficientData)?
.deserialize()?
.power_levels())
}

/// Resets the room's power levels to the default values
///
/// [spec]: https://spec.matrix.org/v1.9/client-server-api/#mroompower_levels
Expand Down

0 comments on commit c97b36a

Please sign in to comment.