Skip to content

Commit e86aab6

Browse files
committed
fix(sdk): Make sure we log the error when we can't compute the power levels of a room
1 parent 48f1bc0 commit e86aab6

File tree

1 file changed

+7
-1
lines changed
  • crates/matrix-sdk/src/room

1 file changed

+7
-1
lines changed

crates/matrix-sdk/src/room/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,13 @@ impl Room {
30063006
return Ok(None);
30073007
};
30083008

3009-
let power_levels = self.power_levels().await.ok().map(Into::into);
3009+
let power_levels = match self.power_levels().await {
3010+
Ok(power_levels) => Some(power_levels.into()),
3011+
Err(error) => {
3012+
error!("Could not compute power levels for push conditions: {error}");
3013+
None
3014+
}
3015+
};
30103016

30113017
Ok(Some(assign!(
30123018
PushConditionRoomCtx::new(

0 commit comments

Comments
 (0)