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 { SET_RAISE_HAND } from '/imports/ui/core/graphql/mutations/userMutations';
|
||||||
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
|
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
|
||||||
import { RAISED_HAND_USERS } from './queries';
|
import { RAISED_HAND_USERS } from './queries';
|
||||||
|
import logger from '/imports/startup/client/logger';
|
||||||
|
|
||||||
const StatusNotifierContainer = (props) => {
|
const StatusNotifierContainer = (props) => {
|
||||||
const { data: currentUserData } = useCurrentUser((user) => ({
|
const { data: currentUserData } = useCurrentUser((user) => ({
|
||||||
@ -22,7 +23,10 @@ const StatusNotifierContainer = (props) => {
|
|||||||
const raiseHandUsers = usersData?.user || [];
|
const raiseHandUsers = usersData?.user || [];
|
||||||
|
|
||||||
if (usersError) {
|
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);
|
const [setRaiseHand] = useMutation(SET_RAISE_HAND);
|
||||||
|
@ -115,7 +115,7 @@ const UserListItem: React.FC<UserListItemProps> = ({ user, lockSettings }) => {
|
|||||||
if (user.mobile && LABEL.mobile) {
|
if (user.mobile && LABEL.mobile) {
|
||||||
subs.push(intl.formatMessage(messages.mobile));
|
subs.push(intl.formatMessage(messages.mobile));
|
||||||
}
|
}
|
||||||
if (user.locked && lockSettings.hasActiveLockSetting && !user.isModerator) {
|
if (user.locked && lockSettings?.hasActiveLockSetting && !user.isModerator) {
|
||||||
subs.push(
|
subs.push(
|
||||||
<span key={uniqueId('lock-')}>
|
<span key={uniqueId('lock-')}>
|
||||||
<Icon iconName="lock" />
|
<Icon iconName="lock" />
|
||||||
|
@ -284,12 +284,8 @@ const UserActions: React.FC<UserActionsProps> = ({
|
|||||||
allowedToSetAway,
|
allowedToSetAway,
|
||||||
} = actionsnPermitions;
|
} = actionsnPermitions;
|
||||||
|
|
||||||
const {
|
|
||||||
disablePrivateChat,
|
|
||||||
} = lockSettings;
|
|
||||||
|
|
||||||
const userLocked = user.locked
|
const userLocked = user.locked
|
||||||
&& lockSettings.hasActiveLockSetting
|
&& lockSettings?.hasActiveLockSetting
|
||||||
&& !user.isModerator;
|
&& !user.isModerator;
|
||||||
|
|
||||||
let userListDropdownItems = [] as PluginSdk.UserListDropdownInterface[];
|
let userListDropdownItems = [] as PluginSdk.UserListDropdownInterface[];
|
||||||
@ -373,7 +369,7 @@ const UserActions: React.FC<UserActionsProps> = ({
|
|||||||
&& (
|
&& (
|
||||||
currentUser.isModerator ? allowedToChatPrivately
|
currentUser.isModerator ? allowedToChatPrivately
|
||||||
: allowedToChatPrivately && (
|
: allowedToChatPrivately && (
|
||||||
!(currentUser.locked && disablePrivateChat)
|
!(currentUser.locked && lockSettings?.disablePrivateChat)
|
||||||
// TODO: Add check for hasPrivateChat between users
|
// TODO: Add check for hasPrivateChat between users
|
||||||
|| user.isModerator
|
|| user.isModerator
|
||||||
)
|
)
|
||||||
@ -434,7 +430,7 @@ const UserActions: React.FC<UserActionsProps> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
allowed: allowedToUnmuteAudio
|
allowed: allowedToUnmuteAudio
|
||||||
&& !lockSettings.disableMic
|
&& !lockSettings?.disableMic
|
||||||
&& !isBreakout,
|
&& !isBreakout,
|
||||||
key: 'unmute',
|
key: 'unmute',
|
||||||
label: intl.formatMessage(messages.UnmuteUserAudioLabel),
|
label: intl.formatMessage(messages.UnmuteUserAudioLabel),
|
||||||
|
Loading…
Reference in New Issue
Block a user