Skip to content

Commit

Permalink
Regression: RoomMembers Permission (#19867)
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Fabris authored Dec 15, 2020
1 parent f5c7d94 commit 3b9f915
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default ({

const { value, phase, more, error } = useGetUsersOfRoom(params);

const canAddUsers = useAtLeastOnePermission([room.t === 'p' ? 'add-user-to-any-p-room' : 'add-user-to-any-c-room', 'add-user-to-joined-room'], rid);
const canAddUsers = useAtLeastOnePermission(useMemo(() => [room.t === 'p' ? 'add-user-to-any-p-room' : 'add-user-to-any-c-room', 'add-user-to-joined-room'], [room.t]), rid);

const handleTextChange = useCallback((event) => {
setText(event.currentTarget.value);
Expand Down

0 comments on commit 3b9f915

Please sign in to comment.