fix ejected user errors
This commit is contained in:
parent
0dee877d0b
commit
8e5c23c473
@ -6,6 +6,7 @@ import RaiseHandNotifier from './component';
|
||||
import { SET_RAISE_HAND } from '/imports/ui/core/graphql/mutations/userMutations';
|
||||
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
|
||||
import { RAISED_HAND_USERS } from './queries';
|
||||
import logger from '/imports/startup/client/logger';
|
||||
|
||||
const StatusNotifierContainer = (props) => {
|
||||
const { data: currentUserData } = useCurrentUser((user) => ({
|
||||
@ -22,7 +23,10 @@ const StatusNotifierContainer = (props) => {
|
||||
const raiseHandUsers = usersData?.user || [];
|
||||
|
||||
if (usersError) {
|
||||
throw new Error(`Error on requesting raise hand data: ${usersError}`);
|
||||
logger.error({
|
||||
logCode: 'raisehand_notifier_container_subscription_error',
|
||||
extraInfo: { usersError },
|
||||
}, 'Error on requesting raise hand data');
|
||||
}
|
||||
|
||||
const [setRaiseHand] = useMutation(SET_RAISE_HAND);
|
||||
|
@ -115,7 +115,7 @@ const UserListItem: React.FC<UserListItemProps> = ({ user, lockSettings }) => {
|
||||
if (user.mobile && LABEL.mobile) {
|
||||
subs.push(intl.formatMessage(messages.mobile));
|
||||
}
|
||||
if (user.locked && lockSettings.hasActiveLockSetting && !user.isModerator) {
|
||||
if (user.locked && lockSettings?.hasActiveLockSetting && !user.isModerator) {
|
||||
subs.push(
|
||||
<span key={uniqueId('lock-')}>
|
||||
<Icon iconName="lock" />
|
||||
|
@ -284,12 +284,8 @@ const UserActions: React.FC<UserActionsProps> = ({
|
||||
allowedToSetAway,
|
||||
} = actionsnPermitions;
|
||||
|
||||
const {
|
||||
disablePrivateChat,
|
||||
} = lockSettings;
|
||||
|
||||
const userLocked = user.locked
|
||||
&& lockSettings.hasActiveLockSetting
|
||||
&& lockSettings?.hasActiveLockSetting
|
||||
&& !user.isModerator;
|
||||
|
||||
let userListDropdownItems = [] as PluginSdk.UserListDropdownInterface[];
|
||||
@ -373,7 +369,7 @@ const UserActions: React.FC<UserActionsProps> = ({
|
||||
&& (
|
||||
currentUser.isModerator ? allowedToChatPrivately
|
||||
: allowedToChatPrivately && (
|
||||
!(currentUser.locked && disablePrivateChat)
|
||||
!(currentUser.locked && lockSettings?.disablePrivateChat)
|
||||
// TODO: Add check for hasPrivateChat between users
|
||||
|| user.isModerator
|
||||
)
|
||||
@ -434,7 +430,7 @@ const UserActions: React.FC<UserActionsProps> = ({
|
||||
},
|
||||
{
|
||||
allowed: allowedToUnmuteAudio
|
||||
&& !lockSettings.disableMic
|
||||
&& !lockSettings?.disableMic
|
||||
&& !isBreakout,
|
||||
key: 'unmute',
|
||||
label: intl.formatMessage(messages.UnmuteUserAudioLabel),
|
||||
|
Loading…
Reference in New Issue
Block a user