diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala
index 5e71e2b914..b28724559f 100644
--- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala
+++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala
@@ -231,7 +231,7 @@ trait UsersApp {
}
users.removeUser(msg.userId)
- regUsers -= getUserAuthToken(msg.userId)
+ removeRegUser(msg.userId)
logger.info("Ejecting user from meeting: mid=[" + meetingID + "]uid=[" + msg.userId + "]")
outGW.send(new UserEjectedFromMeeting(meetingID, recorded, msg.userId, msg.ejectedBy))
@@ -241,14 +241,6 @@ trait UsersApp {
}
}
- def getUserAuthToken(userId: String): String = {
- val regUser = regUsers.values find (ru => userId contains ru.id)
- regUser match {
- case Some(ru) => ru.authToken
- case None => ""
- }
- }
-
def handleUserShareWebcam(msg: UserShareWebcam) {
users.getUser(msg.userId) foreach {user =>
val streams = user.webcamStreams + msg.stream
@@ -474,4 +466,15 @@ trait UsersApp {
}
}
+
+ def getRegisteredUser(userID: String): Option[RegisteredUser] = {
+ regUsers.values find (ru => userID contains ru.id)
+ }
+
+ def removeRegUser(userID: String) {
+ getRegisteredUser(userID) match {
+ case Some(ru) => regUsers -= ru.authToken
+ case None =>
+ }
+ }
}
diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
index 96d543f861..4665f7bebf 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/UserService.as
@@ -181,8 +181,6 @@ package org.bigbluebutton.main.model.users
trace(LOG + "userLoggedIn - Setting my userid to [" + e.userid + "]");
UserManager.getInstance().getConference().setMyUserid(e.userid);
_conferenceParameters.userid = e.userid;
- // since might be a reconnection, clean up users list
- UserManager.getInstance().getConference().removeAllParticipants();
sender.queryForParticipants();
sender.queryForRecordingStatus();
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMap.mxml
index 8012e8337b..8188f1ab01 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/maps/ChatEventMap.mxml
@@ -82,7 +82,7 @@ with BigBlueButton; if not, see .
-
+
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
index 616607b5a5..7c75edde89 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageReceiver.as
@@ -185,7 +185,7 @@ package org.bigbluebutton.modules.users.services
e.userid = userid;
dispatcher.dispatchEvent(e);
- // If the user was the presenter he's reconnecting
+ // If the user was the presenter he's reconnecting and must become viewer
if (UserManager.getInstance().getConference().amIPresenter) {
sendSwitchedPresenterEvent(false, UsersUtil.getPresenterUserID());
UserManager.getInstance().getConference().amIPresenter = false;
@@ -423,6 +423,9 @@ package org.bigbluebutton.modules.users.services
trace(LOG + "*** handleGetUsersReply " + msg.msg + " **** \n");
var map:Object = JSON.parse(msg.msg);
var users:Object = map.users as Array;
+
+ // since might be a reconnection, clean up users list
+ UserManager.getInstance().getConference().removeAllParticipants();
if (map.count > 0) {
trace(LOG + "number of users = [" + users.length + "]");
diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMap.mxml
index 506e4d155d..270d36625b 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMap.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/maps/VideoEventMap.mxml
@@ -126,7 +126,7 @@ with BigBlueButton; if not, see .
-
+