Skip to content
Snippets Groups Projects
Commit 933b9d04 authored by Richard Alam's avatar Richard Alam
Browse files

- make a moderator presenter when the current presenter leaves (e.g....

 - make a moderator presenter when the current presenter leaves (e.g. disconnected). This way, as long as
   there is a moderator in the meeting, there will always be a presenter.
parent 8cd45e9c
No related branches found
No related tags found
No related merge requests found
......@@ -306,6 +306,18 @@ trait UsersApp {
user foreach { u =>
logger.info("User left meeting: mid=[" + meetingID + "] uid=[" + u.userID + "]")
outGW.send(new UserLeft(msg.meetingID, recorded, u))
if (u.presenter) {
/* The current presenter has left the meeting. Find a moderator and make
* him presenter. This way, if there is a moderator in the meeting, there
* will always be a presenter.
*/
val moderator = users.findAModerator()
moderator.foreach { mod =>
logger.info("Presenter left meeting: mid=[" + meetingID + "] uid=[" + u.userID + "]. Making user=[" + mod.userID + "] presenter.")
assignNewPresenter(mod.userID, mod.name, mod.userID)
}
}
}
startCheckingIfWeNeedToEndVoiceConf()
......
......@@ -63,7 +63,7 @@ class UsersModel {
getModerators.length
}
def getLoneModerator():Option[UserVO] = {
def findAModerator():Option[UserVO] = {
uservos.values find (u => u.role == MODERATOR)
}
......
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