Skip to content

Commit

Permalink
Added an extra ui check if all join mod is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Mar 12, 2024
1 parent d695a8c commit 86d5339
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ export default function RoomSettingsRow({
}) {
const updateAPI = useUpdateAPI();
const checkedValue = useMemo(() => {
if (value === 'true' || value === 'ASK_MODERATOR') {
if (disabled) {
return false;
} if (value === 'true' || value === 'ASK_MODERATOR') {
return true;
} if (value === 'false' || value === 'ALWAYS_ACCEPT') {
return false;
}
return value;
}, [value]);
}, [value, disabled]);

if (config === 'false') {
return null;
Expand Down

0 comments on commit 86d5339

Please sign in to comment.