mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2025-12-24 00:01:03 -05:00
feat(ffi): Add fn RoomPowerLevels::events
With this we can query the power level value for any event type
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
b3f6df939b
commit
1f94e9d20c
@@ -29,6 +29,10 @@ impl RoomPowerLevels {
|
||||
self.inner.clone().into()
|
||||
}
|
||||
|
||||
fn events(&self) -> HashMap<String, i64> {
|
||||
self.inner.events.iter().map(|(key, value)| (key.to_string(), (*value).into())).collect()
|
||||
}
|
||||
|
||||
/// Gets a map with the `UserId` of users with power levels other than `0`
|
||||
/// and their power level.
|
||||
pub fn user_power_levels(&self) -> HashMap<String, i64> {
|
||||
|
||||
Reference in New Issue
Block a user