Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
55f116cc
Commit
55f116cc
authored
6 years ago
by
Anton Georgiev
Browse files
Options
Downloads
Patches
Plain Diff
revert presenter assign 6270 6326
parent
f322165e
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js
+1
-28
1 addition, 28 deletions
...l5/imports/api/users/server/handlers/presenterAssigned.js
with
1 addition
and
28 deletions
bigbluebutton-html5/imports/api/users/server/handlers/presenterAssigned.js
+
1
−
28
View file @
55f116cc
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment