mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-09 08:27:32 -04:00
refactor(sdk): Only log the power levels computing error for joined rooms
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
61258e823f
commit
8a6cc7bc22
@@ -3009,7 +3009,11 @@ impl Room {
|
||||
let power_levels = match self.power_levels().await {
|
||||
Ok(power_levels) => Some(power_levels.into()),
|
||||
Err(error) => {
|
||||
error!("Could not compute power levels for push conditions: {error}");
|
||||
if matches!(room_info.state(), RoomState::Joined) {
|
||||
// It's normal to not have the power levels in a non-joined room, so don't log
|
||||
// the error if the room is not joined
|
||||
error!("Could not compute power levels for push conditions: {error}");
|
||||
}
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user