mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
refactor(room): remove sdk::Room::room_power_levels function
This has been replaced by `sdk_base::Room::power_levels`, which can also be used from `sdk::Room`
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
c143f981bd
commit
03535832ec
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user