mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: Panic on PL content deserialization failures
This commit is contained in:
@@ -218,8 +218,12 @@ impl Service {
|
||||
let power_levels_event: RoomPowerLevelsEventContent = self
|
||||
.room_state_get_content(room_id, &StateEventType::RoomPowerLevels, "")
|
||||
.await
|
||||
.unwrap_or_else(|_| {
|
||||
RoomPowerLevelsEventContent::new(&room_version_rules.authorization)
|
||||
.unwrap_or_else(|err| {
|
||||
if err.is_not_found() {
|
||||
RoomPowerLevelsEventContent::new(&room_version_rules.authorization)
|
||||
} else {
|
||||
panic!("Failed to deserialize power levels event content")
|
||||
}
|
||||
});
|
||||
|
||||
RoomPowerLevels::new(
|
||||
|
||||
Reference in New Issue
Block a user