Skip to content

Commit

Permalink
Fix wrong power level in room permission
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura committed Jul 9, 2022
1 parent 4427b3b commit 009966a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/molecules/room-permissions/RoomPermissions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ function RoomPermissions({ roomId }) {
? permissions[permInfo.parent]?.[permKey]
: permissions[permKey];

if (!permValue) permValue = permInfo.default;
if (permValue === undefined) permValue = permInfo.default;

if (typeof permValue === 'number') {
powerLevel = permValue;
} else if (permKey === 'notifications') {
powerLevel = permValue.room || 50;
powerLevel = permValue.room ?? 50;
}
return (
<SettingTile
Expand Down

0 comments on commit 009966a

Please sign in to comment.