Skip to content
Snippets Groups Projects
Unverified Commit a71dd202 authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #6326 from jfsiebel/presenter-default-pod

Fix assignPresenter loop
parents 8a2bbd4c ec91afdd
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,6 @@ export default function handlePresenterAssigned(credentials, meetingId) {
// 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 = {
......@@ -37,15 +36,17 @@ export default function handlePresenterAssigned(credentials, meetingId) {
requesterUserId: assignedBy,
};
if (currentDefaultPodPresenter.currentPresenterId !== '') {
const oldPresenter = Users.findOne({ userId: currentPresenterId });
if (currentPresenterId === '') {
return assignPresenter(podPresenterCredentials, presenterId);
}
const oldPresenter = Users.findOne({ userId: currentPresenterId, connectionStatus: 'offline' });
if (oldPresenter.connectionStatus === 'offline') {
return assignPresenter(podPresenterCredentials, presenterId);
}
return true;
if (oldPresenter) {
return assignPresenter(podPresenterCredentials, presenterId);
}
return assignPresenter(podPresenterCredentials, presenterId);
return true;
}
return changeRole(ROLE_PRESENTER, false, prevPresenter.userId, meetingId, assignedBy);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment