diff --git a/src/client_server/account.rs b/src/client_server/account.rs index f43f73e..2fc8b19 100644 --- a/src/client_server/account.rs +++ b/src/client_server/account.rs @@ -286,18 +286,8 @@ pub async fn register_route( event_type: EventType::RoomPowerLevels, content: serde_json::to_value( ruma::events::room::power_levels::PowerLevelsEventContent { - ban: 50.into(), - events: BTreeMap::new(), - events_default: 0.into(), - invite: 50.into(), - kick: 50.into(), - redact: 50.into(), - state_default: 50.into(), users, - users_default: 0.into(), - notifications: ruma::power_levels::NotificationPowerLevels { - room: 50.into(), - }, + ..Default::default() }, ) .expect("event is valid, we just created it"), diff --git a/src/client_server/room.rs b/src/client_server/room.rs index 72b2d60..3f91324 100644 --- a/src/client_server/room.rs +++ b/src/client_server/room.rs @@ -113,16 +113,8 @@ pub async fn create_room_route( let mut power_levels_content = serde_json::to_value(ruma::events::room::power_levels::PowerLevelsEventContent { - ban: 50.into(), - events: BTreeMap::new(), - events_default: 0.into(), - invite: 50.into(), - kick: 50.into(), - redact: 50.into(), - state_default: 50.into(), users, - users_default: 0.into(), - notifications: ruma::power_levels::NotificationPowerLevels { room: 50.into() }, + ..Default::default() }) .expect("event is valid, we just created it");