Fix wrong power level in room permission
This commit is contained in:
parent
4427b3b291
commit
009966a5c7
1 changed files with 2 additions and 2 deletions
|
@ -237,12 +237,12 @@ function RoomPermissions({ roomId }) {
|
||||||
? permissions[permInfo.parent]?.[permKey]
|
? permissions[permInfo.parent]?.[permKey]
|
||||||
: permissions[permKey];
|
: permissions[permKey];
|
||||||
|
|
||||||
if (!permValue) permValue = permInfo.default;
|
if (permValue === undefined) permValue = permInfo.default;
|
||||||
|
|
||||||
if (typeof permValue === 'number') {
|
if (typeof permValue === 'number') {
|
||||||
powerLevel = permValue;
|
powerLevel = permValue;
|
||||||
} else if (permKey === 'notifications') {
|
} else if (permKey === 'notifications') {
|
||||||
powerLevel = permValue.room || 50;
|
powerLevel = permValue.room ?? 50;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<SettingTile
|
<SettingTile
|
||||||
|
|
Loading…
Reference in a new issue