- assign a presenter when there is none

This commit is contained in:
Richard Alam 2015-07-28 19:53:46 +00:00
parent df71d8a689
commit 6297a60b7a
2 changed files with 5 additions and 1 deletions

View File

@ -302,7 +302,7 @@ trait UsersApp {
outGW.send(new MeetingState(mProps.meetingID, mProps.recorded, uvo.userID, meetingModel.getPermissions(), meetingModel.isMeetingMuted()))
// Become presenter if the only moderator
if (usersModel.numModerators == 1) {
if ((usersModel.numModerators == 1) || (usersModel.noPresenter())) {
if (ru.role == Role.MODERATOR) {
assignNewPresenter(msg.userID, ru.name, msg.userID)
}

View File

@ -96,6 +96,10 @@ class UsersModel {
uservos.values find (u => u.role == MODERATOR)
}
def noPresenter(): Boolean = {
!getCurrentPresenter().isDefined
}
def getCurrentPresenter(): Option[UserVO] = {
uservos.values find (u => u.presenter == true)
}