From 38f9c97f40c6ae89753473fb0c8fe30c6a99596b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 20 Aug 2021 11:30:52 -0500 Subject: [PATCH] fix: Fixes reloads after enabling AV moderation. --- react/features/base/participants/middleware.js | 10 ++++++---- .../components/web/MeetingParticipantContextMenu.js | 4 ++-- .../components/web/MeetingParticipantItem.js | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/react/features/base/participants/middleware.js b/react/features/base/participants/middleware.js index 0a465772f..ac4c8d043 100644 --- a/react/features/base/participants/middleware.js +++ b/react/features/base/participants/middleware.js @@ -284,11 +284,13 @@ StateListenerRegistry.register( } }); } else { - const localParticipantId = getLocalParticipant(store.getState).id; + const localParticipantId = getLocalParticipant(store.getState)?.id; - // We left the conference, the local participant must be updated. - _e2eeUpdated(store, conference, localParticipantId, false); - _raiseHandUpdated(store, conference, localParticipantId, false); + if (localParticipantId) { + // We left the conference, the local participant must be updated. + _e2eeUpdated(store, conference, localParticipantId, false); + _raiseHandUpdated(store, conference, localParticipantId, false); + } } } ); diff --git a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js index 4981703f1..3801b538a 100644 --- a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js +++ b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js @@ -326,7 +326,7 @@ class MeetingParticipantContextMenu extends Component { onMouseEnter = { onEnter } onMouseLeave = { onLeave }> { - !_participant.isFakeParticipant && ( + !_participant?.isFakeParticipant && ( <> { @@ -393,7 +393,7 @@ class MeetingParticipantContextMenu extends Component { } { - _participant.isFakeParticipant && _localVideoOwner && ( + _participant?.isFakeParticipant && _localVideoOwner && ( {t('toolbar.stopSharedVideo')} diff --git a/react/features/participants-pane/components/web/MeetingParticipantItem.js b/react/features/participants-pane/components/web/MeetingParticipantItem.js index bf32226f8..5c3b134e8 100644 --- a/react/features/participants-pane/components/web/MeetingParticipantItem.js +++ b/react/features/participants-pane/components/web/MeetingParticipantItem.js @@ -150,7 +150,7 @@ function MeetingParticipantItem({ videoMuteState = { _isVideoMuted ? MEDIA_STATE.MUTED : MEDIA_STATE.UNMUTED } youText = { youText }> { - !_participant.isFakeParticipant && ( + !_participant?.isFakeParticipant && ( <>