diff --git a/bigbluebutton-html5/imports/api/users-settings/server/publishers.js b/bigbluebutton-html5/imports/api/users-settings/server/publishers.js index cd7c68e73c2526f8d54013c53221fd0c6a5e9109..2b828e2b3d654e218891ee886791811fb64a5bec 100644 --- a/bigbluebutton-html5/imports/api/users-settings/server/publishers.js +++ b/bigbluebutton-html5/imports/api/users-settings/server/publishers.js @@ -16,7 +16,7 @@ function userSettings() { const currentUser = User.findOne({ userId, meetingId }); - if (currentUser && currentUser.breakoutProps.isBreakoutUser) { + if (currentUser && currentUser?.breakoutProps?.isBreakoutUser) { const { parentId } = currentUser.breakoutProps; const [externalId] = currentUser.extId.split('-'); diff --git a/bigbluebutton-html5/imports/ui/components/app/container.jsx b/bigbluebutton-html5/imports/ui/components/app/container.jsx index 204a6c26e7377ebde7ca09103c740b7ef6b28e28..784de29afdc44096efde32faa22e758f9a9a2dca 100755 --- a/bigbluebutton-html5/imports/ui/components/app/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/container.jsx @@ -56,17 +56,18 @@ const AppContainer = (props) => { navbar, actionsbar, media, + currentUserId, ...otherProps } = props; - return ( + return currentUserId ? <App navbar={navbar} actionsbar={actionsbar} media={media} {...otherProps} /> - ); + : null }; const currentUserEmoji = currentUser => (currentUser ? { @@ -95,7 +96,7 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) { fields: { publishedPoll: 1, voiceProp: 1, randomlySelectedUser: 1 } }); const { publishedPoll, voiceProp, randomlySelectedUser } = currentMeeting; - if (!currentUser.approved) { + if (currentUser && !currentUser.approved) { baseControls.updateLoadingState(intl.formatMessage(intlMessages.waitingApprovalMessage)); } @@ -122,8 +123,8 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) startBandwidthMonitoring, handleNetworkConnection: () => updateNavigatorConnection(navigator.connection), randomlySelectedUser, - currentUserId: currentUser.userId, - isPresenter: currentUser.presenter, + currentUserId: currentUser?.userId, + isPresenter: currentUser?.presenter, isLargeFont: Session.get('isLargeFont') }; })(AppContainer))); diff --git a/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx b/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx index db9c29bb66bf2c0e0c588d4eadd14de6a97c87c9..29bb43ba0441554a805d794265a9406b317faeb6 100644 --- a/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx +++ b/bigbluebutton-html5/imports/ui/components/components-data/chat-context/adapter.jsx @@ -89,7 +89,7 @@ const Adapter = () => { /* needed to prevent an issue with dupĂÂșicated messages when user role is changed more info: https://github.com/bigbluebutton/bigbluebutton/issues/11842 */ useEffect(() => { - if (users[Auth.meetingID]) { + if (users[Auth.meetingID] && users[Auth.meetingID][Auth.userID]) { if (currentUserData?.role !== users[Auth.meetingID][Auth.userID].role) { prevUserData = currentUserData; } diff --git a/bigbluebutton-html5/imports/ui/components/components-data/users-context/context.jsx b/bigbluebutton-html5/imports/ui/components/components-data/users-context/context.jsx index 544c57860f8363db2e2e43abea32b284c9eb1b9d..ff3c50bc9664f5b1acd3312c6d16523121302878 100644 --- a/bigbluebutton-html5/imports/ui/components/components-data/users-context/context.jsx +++ b/bigbluebutton-html5/imports/ui/components/components-data/users-context/context.jsx @@ -55,7 +55,7 @@ const reducer = (state, action) => { // USER PERSISTENT DATA case ACTIONS.ADDED_USER_PERSISTENT_DATA: { const { user } = action.value; - if (state[user.meetingId][user.userId]) { + if (state[user.meetingId] && state[user.meetingId][user.userId]) { return state; }