Fix wrong power level in room permission

This commit is contained in:
Ajay Bura 2022-07-09 16:32:42 +05:30
parent 4427b3b291
commit 009966a5c7

View file

@ -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