From 55f116cc95ba7a500edf7d61ce5e0269d916e47d Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Thu, 6 Dec 2018 19:07:51 +0000 Subject: [PATCH] revert presenter assign 6270 6326 --- .../server/handlers/presenterAssigned.js | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js b/bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js index c8a94271ba..105772c232 100644 --- a/bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js +++ b/bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js @@ -1,13 +1,10 @@ import Users from '/imports/api/users'; -import PresentationPods from '/imports/api/presentation-pods'; import changeRole from '/imports/api/users/server/modifiers/changeRole'; -import assignPresenter from '../methods/assignPresenter'; -export default function handlePresenterAssigned(credentials, meetingId) { +export default function handlePresenterAssigned({ body }, meetingId) { const USER_CONFIG = Meteor.settings.public.user; const ROLE_PRESENTER = USER_CONFIG.role_presenter; - const { body } = credentials; const { presenterId, assignedBy } = body; changeRole(ROLE_PRESENTER, true, presenterId, meetingId, assignedBy); @@ -18,34 +15,10 @@ export default function handlePresenterAssigned(credentials, meetingId) { presenter: true, }; - const defaultPodSelector = { - podId: 'DEFAULT_PRESENTATION_POD', - }; - const prevPresenter = Users.findOne(selector); // no previous presenters - // The below code is responsible for set Meeting presenter to be default pod presenter as well. - // It's been handled here because right now akka-apps don't handle all cases scenarios. if (!prevPresenter) { - const currentDefaultPodPresenter = PresentationPods.findOne(defaultPodSelector); - const { currentPresenterId } = currentDefaultPodPresenter; - - const podPresenterCredentials = { - meetingId, - requesterUserId: assignedBy, - }; - - if (currentPresenterId === '') { - return assignPresenter(podPresenterCredentials, presenterId); - } - - const oldPresenter = Users.findOne({ userId: currentPresenterId, connectionStatus: 'offline' }); - - if (oldPresenter) { - return assignPresenter(podPresenterCredentials, presenterId); - } - return true; }