diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx index 0d2565a0f557816453c6c92c90e69ee317a9cb28..26c232b3f462c5dfa1d131a01b73f5e4039c08aa 100644 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx @@ -21,7 +21,9 @@ import MediaService, { const ActionsBarContainer = (props) => { const usingUsersContext = useContext(UsersContext); const { users } = usingUsersContext; - const currentUser = users[Auth.meetingID][Auth.userID]; + + const currentUser = { userId: Auth.userID, emoji: users[Auth.meetingID][Auth.userID].emoji }; + return ( <ActionsBar { ...{ diff --git a/bigbluebutton-html5/imports/ui/components/audio/audio-controls/container.jsx b/bigbluebutton-html5/imports/ui/components/audio/audio-controls/container.jsx index a1015c6158cf5a60fbfbb4941bb3145733f870dd..aed2c2f38397c51b9940cf5a97c5e0c94acf7e93 100755 --- a/bigbluebutton-html5/imports/ui/components/audio/audio-controls/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/audio-controls/container.jsx @@ -22,7 +22,12 @@ import AppService from '/imports/ui/components/app/service'; const ROLE_VIEWER = Meteor.settings.public.user.role_viewer; const APP_CONFIG = Meteor.settings.public.app; -const AudioControlsContainer = (props) => <AudioControls {...props} />; +const AudioControlsContainer = (props) => { + const { + users, lockSettings, userLocks, children, ...newProps + } = props; + return <AudioControls {...newProps} />; +}; const processToggleMuteFromOutside = (e) => { switch (e.data) { diff --git a/bigbluebutton-html5/imports/ui/components/presentation/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/container.jsx index 9efb966b8d552a025b27390b9a74096387f64f61..9a588bbeb7a896069f42d2d03eeaa01e311113b0 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/container.jsx @@ -15,9 +15,14 @@ import WhiteboardService from '/imports/ui/components/whiteboard/service'; const ROLE_VIEWER = Meteor.settings.public.user.role_viewer; const PresentationAreaContainer = ({ presentationPodIds, mountPresentationArea, ...props }) => { + const { layoutSwapped, podId } = props; + const usingUsersContext = useContext(UsersContext); const { users } = usingUsersContext; const currentUser = users[Auth.meetingID][Auth.userID]; + + const userIsPresenter = (podId === 'DEFAULT_PRESENTATION_POD') ? currentUser.presenter : props.isPresenter; + return mountPresentationArea && ( <PresentationArea @@ -25,6 +30,7 @@ const PresentationAreaContainer = ({ presentationPodIds, mountPresentationArea, ...{ ...props, isViewer: currentUser.role === ROLE_VIEWER, + userIsPresenter: userIsPresenter && !layoutSwapped, } } /> @@ -81,7 +87,7 @@ export default withTracker(({ podId }) => { currentSlide, slidePosition, downloadPresentationUri: PresentationAreaService.downloadPresentationUri(podId), - userIsPresenter: PresentationAreaService.isPresenter(podId) && !layoutSwapped, + isPresenter: PresentationAreaService.isPresenter(podId), multiUser: WhiteboardService.hasMultiUserAccess(currentSlide && currentSlide.id, Auth.userID) && !layoutSwapped, presentationIsDownloadable, diff --git a/bigbluebutton-html5/imports/ui/components/presentation/service.js b/bigbluebutton-html5/imports/ui/components/presentation/service.js index 879283f90d8f911e8031c533021089264a019a8c..b04cab4388bb181a3eb595e74d4d1c94104c97b6 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/service.js +++ b/bigbluebutton-html5/imports/ui/components/presentation/service.js @@ -1,7 +1,6 @@ import PresentationPods from '/imports/api/presentation-pods'; import Presentations from '/imports/api/presentations'; import { Slides, SlidePositions } from '/imports/api/slides'; -import Users from '/imports/api/users'; import Auth from '/imports/ui/services/auth'; const getCurrentPresentation = podId => Presentations.findOne({ @@ -163,25 +162,16 @@ const parseCurrentSlideContent = (yesValue, noValue, abstentionValue, trueValue, const isPresenter = (podId) => { // a main presenter in the meeting always owns a default pod - if (podId === 'DEFAULT_PRESENTATION_POD') { - const options = { - filter: { - presenter: 1, - }, + if (podId !== 'DEFAULT_PRESENTATION_POD') { + // if a pod is not default, then we check whether this user owns a current pod + const selector = { + meetingId: Auth.meetingID, + podId, }; - const currentUser = Users.findOne({ - userId: Auth.userID, - }, options); - return currentUser ? currentUser.presenter : false; + const pod = PresentationPods.findOne(selector); + return pod.currentPresenterId === Auth.userID; } - - // if a pod is not default, then we check whether this user owns a current pod - const selector = { - meetingId: Auth.meetingID, - podId, - }; - const pod = PresentationPods.findOne(selector); - return pod.currentPresenterId === Auth.userID; + return true; }; export default { diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/container.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/container.jsx index caf09b7f7137cb815e8d6efe3732836c6c1cd6d7..5a0211b63b80a18f825e412a8b202d29bedf9620 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/container.jsx @@ -12,9 +12,14 @@ const CLOSED_CHAT_LIST_KEY = 'closedChatList'; const UserContentContainer = (props) => { const usingUsersContext = useContext(UsersContext); const { users } = usingUsersContext; - const currentUser = users[Auth.meetingID][Auth.userID]; + const currentUser = { + userId: Auth.userID, + presenter: users[Auth.meetingID][Auth.userID].presenter, + locked: users[Auth.meetingID][Auth.userID].locked, + role: users[Auth.meetingID][Auth.userID].role, + }; return (<UserContent {...props} currentUser={currentUser} />); -} +}; export default withTracker(() => ({ pollIsOpen: Session.equals('isPollOpen', true),