Merge branch 'do-not-send-extra-msg-on-val-token' of https://github.com/ritzalam/bigbluebutton into ritzalam-do-not-send-extra-msg-on-val-token
This commit is contained in:
commit
87e035c7a5
@ -91,14 +91,14 @@ trait ValidateAuthTokenReqMsgHdlr extends HandlerHelpers {
|
||||
|
||||
// TODO: REMOVE Temp only so we can implement user handling in client. (ralam june 21, 2017)
|
||||
|
||||
sendAllUsersInMeeting(user.id)
|
||||
sendAllVoiceUsersInMeeting(user.id, liveMeeting.voiceUsers, meetingId)
|
||||
sendAllWebcamStreams(outGW, user.id, liveMeeting.webcams, meetingId)
|
||||
val newState = userJoinMeeting(outGW, user.authToken, liveMeeting, state)
|
||||
if (!Users2x.hasPresenter(liveMeeting.users2x)) {
|
||||
automaticallyAssignPresenter(outGW, liveMeeting)
|
||||
}
|
||||
newState
|
||||
//sendAllUsersInMeeting(user.id)
|
||||
//sendAllVoiceUsersInMeeting(user.id, liveMeeting.voiceUsers, meetingId)
|
||||
//sendAllWebcamStreams(outGW, user.id, liveMeeting.webcams, meetingId)
|
||||
//val newState = userJoinMeeting(outGW, user.authToken, liveMeeting, state)
|
||||
//if (!Users2x.hasPresenter(liveMeeting.users2x)) {
|
||||
// automaticallyAssignPresenter(outGW, liveMeeting)
|
||||
// }
|
||||
state
|
||||
}
|
||||
|
||||
def sendAllUsersInMeeting(requesterId: String): Unit = {
|
||||
|
@ -51,21 +51,13 @@ class ReceivedJsonMsgHandlerActor(
|
||||
case CreateMeetingReqMsg.NAME =>
|
||||
route[CreateMeetingReqMsg](meetingManagerChannel, envelope, jsonNode)
|
||||
case ValidateAuthTokenReqMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[ValidateAuthTokenReqMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[ValidateAuthTokenReqMsg](envelope, jsonNode)
|
||||
case RegisterUserReqMsg.NAME =>
|
||||
// Route via meeting manager as there is a race condition if we send directly to meeting
|
||||
// because the meeting actor might not have been created yet.
|
||||
route[RegisterUserReqMsg](meetingManagerChannel, envelope, jsonNode)
|
||||
case UserJoinMeetingReqMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[UserJoinMeetingReqMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.userId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[UserJoinMeetingReqMsg](envelope, jsonNode)
|
||||
case GetAllMeetingsReqMsg.NAME =>
|
||||
route[GetAllMeetingsReqMsg](meetingManagerChannel, envelope, jsonNode)
|
||||
case DestroyMeetingSysCmdMsg.NAME =>
|
||||
|
@ -51,7 +51,9 @@ trait HandlerHelpers extends SystemConfiguration {
|
||||
val event = UserJoinedMeetingEvtMsgBuilder.build(liveMeeting.props.meetingProp.intId, newUser)
|
||||
outGW.send(event)
|
||||
startRecordingIfAutoStart2x(outGW, liveMeeting)
|
||||
|
||||
if (!Users2x.hasPresenter(liveMeeting.users2x)) {
|
||||
automaticallyAssignPresenter(outGW, liveMeeting)
|
||||
}
|
||||
state.update(state.expiryTracker.setUserHasJoined())
|
||||
case None =>
|
||||
state
|
||||
|
@ -23,24 +23,32 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr {
|
||||
if (!liveMeeting.permissionsEqual(settings)) {
|
||||
liveMeeting.newPermissions(settings)
|
||||
|
||||
def build(meetingId: String, userId: String, settings: Permissions, setBy: String): BbbCommonEnvCoreMsg = {
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId)
|
||||
val envelope = BbbCoreEnvelope(LockSettingsInMeetingChangedEvtMsg.NAME, routing)
|
||||
val body = LockSettingsInMeetingChangedEvtMsgBody(
|
||||
disableCam = settings.disableCam,
|
||||
disableMic = settings.disableMic, disablePrivChat = settings.disablePrivChat,
|
||||
disablePubChat = settings.disablePubChat, lockedLayout = settings.lockedLayout,
|
||||
lockOnJoin = settings.lockOnJoin, lockOnJoinConfigurable = settings.lockOnJoinConfigurable,
|
||||
setBy
|
||||
)
|
||||
val header = BbbClientMsgHeader(LockSettingsInMeetingChangedEvtMsg.NAME, meetingId, userId)
|
||||
val event = LockSettingsInMeetingChangedEvtMsg(header, body)
|
||||
val routing = Routing.addMsgToClientRouting(
|
||||
MessageTypes.BROADCAST_TO_MEETING,
|
||||
props.meetingProp.intId,
|
||||
msg.body.setBy
|
||||
)
|
||||
val envelope = BbbCoreEnvelope(
|
||||
LockSettingsInMeetingChangedEvtMsg.NAME,
|
||||
routing
|
||||
)
|
||||
val body = LockSettingsInMeetingChangedEvtMsgBody(
|
||||
disableCam = settings.disableCam,
|
||||
disableMic = settings.disableMic,
|
||||
disablePrivChat = settings.disablePrivChat,
|
||||
disablePubChat = settings.disablePubChat,
|
||||
lockedLayout = settings.lockedLayout,
|
||||
lockOnJoin = settings.lockOnJoin,
|
||||
lockOnJoinConfigurable = settings.lockOnJoinConfigurable,
|
||||
msg.body.setBy
|
||||
)
|
||||
val header = BbbClientMsgHeader(
|
||||
LockSettingsInMeetingChangedEvtMsg.NAME,
|
||||
props.meetingProp.intId,
|
||||
msg.body.setBy
|
||||
)
|
||||
|
||||
BbbCommonEnvCoreMsg(envelope, event)
|
||||
}
|
||||
|
||||
val event = build(props.meetingProp.intId, msg.body.setBy, settings, msg.body.setBy)
|
||||
outGW.send(event)
|
||||
outGW.send(BbbCommonEnvCoreMsg(envelope, LockSettingsInMeetingChangedEvtMsg(header, body)))
|
||||
|
||||
processLockLayout(settings.lockedLayout, msg.body.setBy)
|
||||
}
|
||||
@ -48,21 +56,16 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr {
|
||||
|
||||
def processLockLayout(lock: Boolean, setBy: String): Unit = {
|
||||
|
||||
def broadcastEvent(lock: Boolean, setBy: String): Unit = {
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, setBy)
|
||||
val envelope = BbbCoreEnvelope(LockLayoutEvtMsg.NAME, routing)
|
||||
val header = BbbClientMsgHeader(LockLayoutEvtMsg.NAME, liveMeeting.props.meetingProp.intId, setBy)
|
||||
|
||||
val body = LockLayoutEvtMsgBody(setBy, lock, affectedUsers)
|
||||
val event = LockLayoutEvtMsg(header, body)
|
||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||
|
||||
outGW.send(msgEvent)
|
||||
}
|
||||
|
||||
liveMeeting.lockLayout(lock)
|
||||
|
||||
broadcastEvent(lock, setBy)
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, liveMeeting.props.meetingProp.intId, setBy)
|
||||
val envelope = BbbCoreEnvelope(LockLayoutEvtMsg.NAME, routing)
|
||||
val header = BbbClientMsgHeader(LockLayoutEvtMsg.NAME, liveMeeting.props.meetingProp.intId, setBy)
|
||||
val body = LockLayoutEvtMsgBody(setBy, lock, affectedUsers)
|
||||
val event = LockLayoutEvtMsg(header, body)
|
||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||
|
||||
outGW.send(msgEvent)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ package org.bigbluebutton.main.model.users
|
||||
import org.bigbluebutton.main.events.InvalidAuthTokenEvent;
|
||||
import org.bigbluebutton.main.model.options.ApplicationOptions;
|
||||
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
|
||||
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
|
||||
|
||||
public class NetConnectionDelegate {
|
||||
private static const LOGGER:ILogger = getClassLogger(NetConnectionDelegate);
|
||||
@ -143,6 +143,7 @@ package org.bigbluebutton.main.model.users
|
||||
dispatcher.dispatchEvent(waitCommand);
|
||||
} else {
|
||||
LiveMeeting.inst().me.waitingForApproval = false;
|
||||
dispatcher.dispatchEvent(new TokenValidEvent());
|
||||
sendConnectionSuccessEvent(userId);
|
||||
}
|
||||
} else {
|
||||
@ -157,7 +158,7 @@ package org.bigbluebutton.main.model.users
|
||||
|
||||
public function onMessageFromServer2x(messageName:String, msg:String):void {
|
||||
if (messageName != "SendCursorPositionEvtMsg") {
|
||||
LOGGER.debug("onMessageFromServer2x - " + msg);
|
||||
LOGGER.info("onMessageFromServer2x - " + msg);
|
||||
}
|
||||
|
||||
var map:Object = JSON.parse(msg);
|
||||
|
@ -229,22 +229,22 @@ package org.bigbluebutton.modules.layout.managers
|
||||
_canvas.windowManager.addEventListener(EffectEvent.EFFECT_END, function(e:EffectEvent):void {
|
||||
var obj:Object = (e as Object);
|
||||
if (obj.mdiEventType == "windowAdd") {
|
||||
LOGGER.debug("Ignoring windowAdd");
|
||||
//LOGGER.debug("Ignoring windowAdd");
|
||||
return;
|
||||
}
|
||||
var windows:Array = obj.windows;
|
||||
if (windows != null) {
|
||||
for each (var window:MDIWindow in windows) {
|
||||
LOGGER.debug(e.type + "/" + obj.mdiEventType + " on window " + WindowLayout.getType(window));
|
||||
//LOGGER.debug(e.type + "/" + obj.mdiEventType + " on window " + WindowLayout.getType(window));
|
||||
onActionOverWindowFinished(window);
|
||||
}
|
||||
} else {
|
||||
LOGGER.debug(e.type + "/" + obj.mdiEventType + " with no window associated");
|
||||
//LOGGER.debug(e.type + "/" + obj.mdiEventType + " with no window associated");
|
||||
}
|
||||
});
|
||||
_canvas.windowManager.addEventListener(MDIManagerEvent.WINDOW_ADD, function(e:MDIManagerEvent):void {
|
||||
checkSingleWindowPermissions(e.window);
|
||||
LOGGER.debug("applying layout to just created window " + WindowLayout.getType(e.window));
|
||||
//LOGGER.debug("applying layout to just created window " + WindowLayout.getType(e.window));
|
||||
applyLayout(_currentLayout);
|
||||
});
|
||||
|
||||
@ -321,12 +321,12 @@ package org.bigbluebutton.modules.layout.managers
|
||||
}
|
||||
|
||||
private function applyLayout(layout:LayoutDefinition):void {
|
||||
LOGGER.debug("applyLayout");
|
||||
//LOGGER.debug("applyLayout");
|
||||
detectContainerChange = false;
|
||||
|
||||
if (layout != null) {
|
||||
layout.applyToCanvas(_canvas, function():void {
|
||||
LOGGER.debug("layout applied successfully, resetting detectContainerChange");
|
||||
//LOGGER.debug("layout applied successfully, resetting detectContainerChange");
|
||||
detectContainerChange = true;
|
||||
});
|
||||
dispatchSwitchedLayoutEvent(layout.name);
|
||||
@ -338,13 +338,13 @@ package org.bigbluebutton.modules.layout.managers
|
||||
}
|
||||
|
||||
private function set detectContainerChange(detect:Boolean):void {
|
||||
LOGGER.debug("setting detectContainerChange to " + detect);
|
||||
//LOGGER.debug("setting detectContainerChange to " + detect);
|
||||
if (detect) {
|
||||
_applyingLayoutCounter--;
|
||||
} else {
|
||||
_applyingLayoutCounter++;
|
||||
}
|
||||
LOGGER.debug("current value of detectContainerChange: " + detectContainerChange);
|
||||
//LOGGER.debug("current value of detectContainerChange: " + detectContainerChange);
|
||||
}
|
||||
|
||||
private function get detectContainerChange():Boolean {
|
||||
@ -423,7 +423,7 @@ package org.bigbluebutton.modules.layout.managers
|
||||
}
|
||||
|
||||
private function onMDIManagerEvent(e:MDIManagerEvent):void {
|
||||
LOGGER.debug("Window has been modified. Event=[" + e.type + "]");
|
||||
//LOGGER.debug("Window has been modified. Event=[" + e.type + "]");
|
||||
onActionOverWindowFinished(e.window);
|
||||
}
|
||||
|
||||
@ -446,7 +446,7 @@ package org.bigbluebutton.modules.layout.managers
|
||||
//trace(LOG + "updateCurrentLayout - currentLayout = [" + layout.name + "]");
|
||||
layout.currentLayout = true;
|
||||
} else if (detectContainerChange) {
|
||||
LOGGER.debug("invalidating layout event");
|
||||
//LOGGER.debug("invalidating layout event");
|
||||
_globalDispatcher.dispatchEvent(new LayoutEvent(LayoutEvent.INVALIDATE_LAYOUT_EVENT));
|
||||
_currentLayout = LayoutDefinition.getLayout(_canvas, ResourceUtil.getInstance().getString('bbb.layout.combo.customName'));
|
||||
//trace(LOG + "updateCurrentLayout - layout is NULL! Setting currentLayout = [" + _currentLayout.name + "]");
|
||||
|
@ -61,7 +61,21 @@ package org.bigbluebutton.modules.users.services
|
||||
}
|
||||
|
||||
public function joinMeeting(): void {
|
||||
// TODO: Send joine meeting message to server.
|
||||
LOGGER.info("Sending JOIN MEETING message");
|
||||
|
||||
var message:Object = {
|
||||
header: {name: "UserJoinMeetingReqMsg", meetingId: UsersUtil.getInternalMeetingID(), userId: UsersUtil.getMyUserID()},
|
||||
body: {userId: UsersUtil.getMyUserID(), authToken: LiveMeeting.inst().me.authToken}
|
||||
};
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage2x(function(result:String):void { // On successful result
|
||||
}, function(status:String):void { // status - On error occurred
|
||||
var logData:Object = UsersUtil.initLogData();
|
||||
logData.tags = ["apps"];
|
||||
logData.message = "Error occurred assigning a presenter.";
|
||||
LOGGER.info(JSON.stringify(logData));
|
||||
}, JSON.stringify(message));
|
||||
}
|
||||
|
||||
public function assignPresenter(newPresenterUserId:String, newPresenterName:String, assignedBy:String):void {
|
||||
|
@ -173,7 +173,6 @@ package org.bigbluebutton.modules.users.views
|
||||
if (user != null) {
|
||||
removeVoiceFromWebUser(users, user);
|
||||
} else {
|
||||
//removeVoiceOnlyUser(users, vu);
|
||||
removeUser(userId, users);
|
||||
}
|
||||
users.refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user