- assign a presenter when there is none
This commit is contained in:
parent
df71d8a689
commit
6297a60b7a
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user