events: Add conversion from RoomPowerLevels to RoomPowerLvelsEventContent
This commit is contained in:
parent
3a47403a75
commit
6b768dc033
@ -34,6 +34,7 @@ Improvements:
|
||||
* Add unstable support for threads (MSC3440)
|
||||
* Add `ReceiptEventContent::user_receipt`
|
||||
* Make `Restricted::allow` public
|
||||
* Conversion from `RoomPowerLevels` to `RoomPowerLevelsEventContent`
|
||||
|
||||
# 0.8.0
|
||||
|
||||
|
@ -284,6 +284,23 @@ impl From<RedactedRoomPowerLevelsEventContent> for RoomPowerLevels {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<RoomPowerLevels> for RoomPowerLevelsEventContent {
|
||||
fn from(c: RoomPowerLevels) -> Self {
|
||||
Self {
|
||||
ban: c.ban,
|
||||
events: c.events,
|
||||
events_default: c.events_default,
|
||||
invite: c.invite,
|
||||
kick: c.kick,
|
||||
redact: c.redact,
|
||||
state_default: c.state_default,
|
||||
users: c.users,
|
||||
users_default: c.users_default,
|
||||
notifications: c.notifications,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user