renamed noRedirect* to redirectToHtml5*

This commit is contained in:
Anton Georgiev 2018-06-06 21:38:28 +00:00
parent a77ee38741
commit eb7a49f142
5 changed files with 27 additions and 27 deletions

View File

@ -1,6 +1,6 @@
import com.google.gson.Gson
import org.bigbluebutton.messages.BreakoutRoomJoinURL
object BreakoutRoom {
val gson = new Gson //> gson : com.google.gson.Gson = {serializeNulls:falsefactories:[Factory[typeH
//| ierarchy=com.google.gson.JsonElement,adapter=com.google.gson.internal.bind.T
@ -16,8 +16,8 @@ object BreakoutRoom {
//| nal.bind.TypeAdapters$11@3ac42916], Factory[type=java.lang.Double+double,ada
//| pter=com.google.gson.Gso
//| Output exceeds cutoff limit.
val string = "{\"payload\":{\"redirectJoinUrl\":\"alink\",\"breakoutMeetingId\":\"4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031\",\"noRedirectJoinUrl\":\"http://bbb.riadvice.com/bigbluebutton/api/join?fullName\u003dOpera\u0026isBreakout\u003dtrue\u0026meetingID\u003d4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031\u0026password\u003dmp\u0026redirect\u003dfalse\u0026userID\u003d6pt0vfeaxdze_1-1\u0026checksum\u003d51c4a1398b88170c25f1a71521bca604e784ab23\",\"parentMeetingId\":\"183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1479728593178\",\"userId\":\"6pt0vfeaxdze_1\"},\"header\":{\"name\":\"BreakoutRoomJoinURL\",\"version\":\"0.0.1\",\"current_time\":1479728673586,\"timestamp\":8549632}}"
val string = "{\"payload\":{\"redirectJoinUrl\":\"alink\",\"breakoutMeetingId\":\"4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031\",\"redirectToHtml5JoinUrl\":\"http://bbb.riadvice.com/bigbluebutton/api/join?fullName\u003dOpera\u0026isBreakout\u003dtrue\u0026meetingID\u003d4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031\u0026password\u003dmp\u0026redirect\u003dfalse\u0026userID\u003d6pt0vfeaxdze_1-1\u0026checksum\u003d51c4a1398b88170c25f1a71521bca604e784ab23\",\"parentMeetingId\":\"183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1479728593178\",\"userId\":\"6pt0vfeaxdze_1\"},\"header\":{\"name\":\"BreakoutRoomJoinURL\",\"version\":\"0.0.1\",\"current_time\":1479728673586,\"timestamp\":8549632}}"
//> string : String = {"payload":{"redirectJoinUrl":"alink","breakoutMeetingId"
//| :"4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031","noRedirectJoinUrl
//| ":"http://bbb.riadvice.com/bigbluebutton/api/join?fullName=Opera&isBreakout=
@ -26,14 +26,14 @@ object BreakoutRoom {
//| 1521bca604e784ab23","parentMeetingId":"183f0bf3a0982a127bdb8161e0c44eb696b3e
//| 75c-1479728593178","userId":"6pt0vfeaxdze_1"},"header":{"name":"BreakoutRoom
//| JoinURL","version":"0.0.1","current_time":1479728673586,"timestamp":8549632}
//| }
//| }
val brjum: BreakoutRoomJoinURL = gson.fromJson(string, classOf[BreakoutRoomJoinURL])
//> brjum : org.bigbluebutton.messages.BreakoutRoomJoinURL = org.bigbluebutton.
//| messages.BreakoutRoomJoinURL@3327bd23
println(brjum.payload.userId) //> 6pt0vfeaxdze_1
println(brjum.payload.parentMeetingId) //> 183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1479728593178
println(brjum.payload.breakoutMeetingId) //> 4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031
println(brjum.payload.redirectJoinURL) //> null
println(brjum.payload.noRedirectJoinURL) //> null
//| messages.BreakoutRoomJoinURL@3327bd23
println(brjum.payload.userId) //> 6pt0vfeaxdze_1
println(brjum.payload.parentMeetingId) //> 183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1479728593178
println(brjum.payload.breakoutMeetingId) //> 4455e780b6f62cd5fcf09367aef62d9bc5108375-1479728671031
println(brjum.payload.redirectJoinURL) //> null
println(brjum.payload.redirectToHtml5JoinURL) //> null
}

View File

@ -17,37 +17,37 @@ trait BreakoutHdlrHelpers extends SystemConfiguration {
for {
user <- Users2x.findWithIntId(liveMeeting.users2x, userId)
apiCall = "join"
(redirectParams, noRedirectParams) = BreakoutRoomsUtil.joinParams(user.name, userId + "-" + roomSequence, true,
(redirectParams, redirectToHtml5Params) = BreakoutRoomsUtil.joinParams(user.name, userId + "-" + roomSequence, true,
externalMeetingId, liveMeeting.props.password.moderatorPass)
// We generate a first url with redirect -> true
redirectBaseString = BreakoutRoomsUtil.createBaseString(redirectParams)
redirectJoinURL = BreakoutRoomsUtil.createJoinURL(bbbWebAPI, apiCall, redirectBaseString,
BreakoutRoomsUtil.calculateChecksum(apiCall, redirectBaseString, bbbWebSharedSecret))
// We generate a second url with redirect -> false
noRedirectBaseString = BreakoutRoomsUtil.createBaseString(noRedirectParams)
noRedirectJoinURL = BreakoutRoomsUtil.createJoinURL(bbbWebAPI, apiCall, noRedirectBaseString,
BreakoutRoomsUtil.calculateChecksum(apiCall, noRedirectBaseString, bbbWebSharedSecret))
// We generate a second url with redirect -> true and joinViaHtml5 -> true
redirectToHtml5BaseString = BreakoutRoomsUtil.createBaseString(redirectToHtml5Params)
redirectToHtml5JoinURL = BreakoutRoomsUtil.createJoinURL(bbbWebAPI, apiCall, redirectToHtml5BaseString,
BreakoutRoomsUtil.calculateChecksum(apiCall, redirectToHtml5BaseString, bbbWebSharedSecret))
} yield {
sendJoinURLMsg(liveMeeting.props.meetingProp.intId, breakoutId, externalMeetingId,
userId, redirectJoinURL, noRedirectJoinURL)
userId, redirectJoinURL, redirectToHtml5JoinURL)
}
}
def sendJoinURLMsg(meetingId: String, breakoutId: String, externalId: String,
userId: String, redirectJoinURL: String, noRedirectJoinURL: String): Unit = {
userId: String, redirectJoinURL: String, redirectToHtml5JoinURL: String): Unit = {
def build(meetingId: String, breakoutId: String,
userId: String, redirectJoinURL: String, noRedirectJoinURL: String): BbbCommonEnvCoreMsg = {
userId: String, redirectJoinURL: String, redirectToHtml5JoinURL: String): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
val envelope = BbbCoreEnvelope(BreakoutRoomJoinURLEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(BreakoutRoomJoinURLEvtMsg.NAME, meetingId, userId)
val body = BreakoutRoomJoinURLEvtMsgBody(meetingId, breakoutId, externalId,
userId, redirectJoinURL, noRedirectJoinURL)
userId, redirectJoinURL, redirectToHtml5JoinURL)
val event = BreakoutRoomJoinURLEvtMsg(header, body)
BbbCommonEnvCoreMsg(envelope, event)
}
val msgEvent = build(meetingId, breakoutId, userId, redirectJoinURL, noRedirectJoinURL)
val msgEvent = build(meetingId, breakoutId, userId, redirectJoinURL, redirectToHtml5JoinURL)
outGW.send(msgEvent)
}

View File

@ -8,7 +8,7 @@ package org.bigbluebutton.common2.msgs
object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" }
case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg
case class BreakoutRoomJoinURLEvtMsgBody(parentId: String, breakoutId: String, externalId: String,
userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
userId: String, redirectJoinURL: String, redirectToHtml5JoinURL: String)
// Outgoing messages
object BreakoutRoomsListEvtMsg { val NAME = "BreakoutRoomsListEvtMsg" }
@ -69,7 +69,7 @@ package org.bigbluebutton.common2.msgs
object RequestBreakoutJoinURLRespMsg { val NAME = "RequestBreakoutJoinURLRespMsg" }
case class RequestBreakoutJoinURLRespMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLRespMsgBody) extends BbbCoreMsg
case class RequestBreakoutJoinURLRespMsgBody(parentId: String, breakoutId: String,
userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
userId: String, redirectJoinURL: String, redirectToHtml5JoinURL: String)
object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" }

View File

@ -4,12 +4,12 @@ import Breakouts from '/imports/api/breakouts';
export default function handleBreakoutJoinURL({ body }) {
const {
noRedirectJoinURL,
redirectToHtml5JoinURL,
userId,
breakoutId,
} = body;
check(noRedirectJoinURL, String);
check(redirectToHtml5JoinURL, String);
const selector = {
breakoutId,
@ -20,7 +20,7 @@ export default function handleBreakoutJoinURL({ body }) {
users: userId,
},
$set: {
noRedirectJoinURL,
redirectToHtml5JoinURL,
},
};

View File

@ -4,7 +4,7 @@ const getBreakouts = () => Breakouts.find().fetch();
const getBreakoutJoinURL = breakout =>
// experimental
breakout.noRedirectJoinURL;
breakout.redirectToHtml5JoinURL;
export default {
getBreakouts,
getBreakoutJoinURL,