feat(akka): join param to flag user as bot

Introduces new join parameter `bot` to flag users as bot.
This commit is contained in:
Arthurk12 2024-10-16 12:30:02 -03:00
parent a52586f217
commit 86ea21e52b
26 changed files with 88 additions and 47 deletions

View File

@ -59,8 +59,8 @@ trait RegisterUserReqMsgHdlr {
val regUser = RegisteredUsers.create(liveMeeting.props.meetingProp.intId, msg.body.intUserId, msg.body.extUserId,
msg.body.name, msg.body.role, msg.body.authToken, Vector(msg.body.sessionToken),
msg.body.avatarURL, msg.body.webcamBackgroundURL, ColorPicker.nextColor(liveMeeting.props.meetingProp.intId), msg.body.guest, msg.body.authed,
guestStatus, msg.body.excludeFromDashboard, msg.body.enforceLayout, msg.body.userMetadata, false)
msg.body.avatarURL, msg.body.webcamBackgroundURL, ColorPicker.nextColor(liveMeeting.props.meetingProp.intId), msg.body.bot,
msg.body.guest, msg.body.authed, guestStatus, msg.body.excludeFromDashboard, msg.body.enforceLayout, msg.body.userMetadata, false)
checkUserConcurrentAccesses(regUser)
RegisteredUsers.add(liveMeeting.registeredUsers, regUser, liveMeeting.props.meetingProp.intId)

View File

@ -33,7 +33,7 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends SystemConfiguration {
def registerUserInRegisteredUsers() = {
val regUser = RegisteredUsers.create(liveMeeting.props.meetingProp.intId, msg.body.intId, msg.body.voiceUserId,
msg.body.callerIdName, Roles.VIEWER_ROLE, msg.body.intId, Vector(""), "", "", userColor,
msg.body.callerIdName, Roles.VIEWER_ROLE, msg.body.intId, Vector(""), "", "", userColor, false,
true, true, GuestStatus.WAIT, true, "", Map(), false)
RegisteredUsers.add(liveMeeting.registeredUsers, regUser, liveMeeting.props.meetingProp.intId)
}
@ -45,6 +45,7 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends SystemConfiguration {
meetingId = liveMeeting.props.meetingProp.intId,
name = msg.body.callerIdName,
role = Roles.VIEWER_ROLE,
bot = false,
guest = true,
authed = true,
guestStatus = GuestStatus.WAIT,

View File

@ -18,6 +18,7 @@ case class UserDbModel(
joinErrorCode: Option[String],
banned: Boolean = false,
loggedOut: Boolean = false,
bot: Boolean,
guest: Boolean,
guestStatus: String,
registeredOn: Long,
@ -30,7 +31,7 @@ case class UserDbModel(
class UserDbTableDef(tag: Tag) extends Table[UserDbModel](tag, None, "user") {
override def * = (
meetingId,userId,extId,name,role,avatar,webcamBackground,color, authToken, authed,joined,joinErrorCode,
joinErrorMessage, banned,loggedOut,guest,guestStatus,registeredOn,excludeFromDashboard, enforceLayout) <> (UserDbModel.tupled, UserDbModel.unapply)
joinErrorMessage, banned,loggedOut,bot, guest,guestStatus,registeredOn,excludeFromDashboard, enforceLayout) <> (UserDbModel.tupled, UserDbModel.unapply)
val meetingId = column[String]("meetingId", O.PrimaryKey)
val userId = column[String]("userId", O.PrimaryKey)
val extId = column[String]("extId")
@ -46,6 +47,7 @@ class UserDbTableDef(tag: Tag) extends Table[UserDbModel](tag, None, "user") {
val joinErrorMessage = column[Option[String]]("joinErrorMessage")
val banned = column[Boolean]("banned")
val loggedOut = column[Boolean]("loggedOut")
val bot = column[Boolean]("bot")
val guest = column[Boolean]("guest")
val guestStatus = column[String]("guestStatus")
val registeredOn = column[Long]("registeredOn")
@ -73,6 +75,7 @@ object UserDAO {
joinErrorMessage = None,
banned = regUser.banned,
loggedOut = regUser.loggedOut,
bot = regUser.bot,
guest = regUser.guest,
guestStatus = regUser.guestStatus,
registeredOn = regUser.registeredOn,

View File

@ -6,8 +6,8 @@ import org.bigbluebutton.core.domain.BreakoutRoom2x
object RegisteredUsers {
def create(meetingId: String, userId: String, extId: String, name: String, roles: String,
authToken: String, sessionToken: Vector[String], avatar: String, webcamBackground: String, color: String, guest: Boolean, authenticated: Boolean,
guestStatus: String, excludeFromDashboard: Boolean, enforceLayout: String,
authToken: String, sessionToken: Vector[String], avatar: String, webcamBackground: String, color: String, bot: Boolean,
guest: Boolean, authenticated: Boolean, guestStatus: String, excludeFromDashboard: Boolean, enforceLayout: String,
userMetadata: Map[String, String], loggedOut: Boolean): RegisteredUser = {
new RegisteredUser(
userId,
@ -20,6 +20,7 @@ object RegisteredUsers {
avatar,
webcamBackground,
color,
bot,
guest,
authenticated,
guestStatus,
@ -256,6 +257,7 @@ case class RegisteredUser(
avatarURL: String,
webcamBackgroundURL: String,
color: String,
bot: Boolean,
guest: Boolean,
authed: Boolean,
guestStatus: String,

View File

@ -67,7 +67,7 @@ object Users2x {
}
def numUsers(users: Users2x): Int = {
users.toVector.length
users.toVector.filter(u => !u.bot).length
}
def numActiveModerators(users: Users2x): Int = {
@ -432,6 +432,7 @@ case class UserState(
meetingId: String,
name: String,
role: String,
bot: Boolean,
guest: Boolean,
pin: Boolean,
mobile: Boolean,

View File

@ -48,6 +48,7 @@ trait HandlerHelpers extends SystemConfiguration {
meetingId = regUser.meetingId,
name = regUser.name,
role = regUser.role,
bot = regUser.bot,
guest = regUser.guest,
authed = regUser.authed,
guestStatus = regUser.guestStatus,

View File

@ -9,7 +9,7 @@ object UserJoinedMeetingEvtMsgBuilder {
val envelope = BbbCoreEnvelope(UserJoinedMeetingEvtMsg.NAME, routing)
val body = UserJoinedMeetingEvtMsgBody(intId = userState.intId, extId = userState.extId, name = userState.name,
role = userState.role, guest = userState.guest, authed = userState.authed,
role = userState.role, bot = userState.bot, guest = userState.guest, authed = userState.authed,
guestStatus = userState.guestStatus,
reactionEmoji = userState.reactionEmoji,
raiseHand = userState.raiseHand,

View File

@ -9,21 +9,21 @@ import org.bigbluebutton.core.running.LiveMeeting
trait FakeTestData {
def createFakeUsers(liveMeeting: LiveMeeting): Unit = {
val mod1 = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, false, false, CallingWith.WEBRTC, muted = false,
val mod1 = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, bot = false, false, false, CallingWith.WEBRTC, muted = false,
talking = true, listenOnly = false)
Users2x.add(liveMeeting.users2x, mod1)
val mod2 = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, guest = false, authed = true, CallingWith.WEBRTC, muted = false,
val mod2 = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, bot = false, guest = false, authed = true, CallingWith.WEBRTC, muted = false,
talking = false, listenOnly = false)
Users2x.add(liveMeeting.users2x, mod2)
val guest1 = createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, guest = true, authed = true, CallingWith.WEBRTC, muted = false,
val guest1 = createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, bot = false, guest = true, authed = true, CallingWith.WEBRTC, muted = false,
talking = false, listenOnly = false)
Users2x.add(liveMeeting.users2x, guest1)
val guestWait1 = GuestWaiting(guest1.intId, guest1.name, guest1.role, guest1.guest, "", "", "#ff6242", guest1.authed, System.currentTimeMillis())
GuestsWaiting.add(liveMeeting.guestsWaiting, guestWait1)
val guest2 = createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, guest = true, authed = true, CallingWith.FLASH, muted = false,
val guest2 = createUserVoiceAndCam(liveMeeting, Roles.VIEWER_ROLE, bot = false, guest = true, authed = true, CallingWith.FLASH, muted = false,
talking = false, listenOnly = false)
Users2x.add(liveMeeting.users2x, guest2)
val guestWait2 = GuestWaiting(guest2.intId, guest2.name, guest2.role, guest2.guest, "", "", "#ff6242", guest2.authed, System.currentTimeMillis())
@ -44,16 +44,16 @@ trait FakeTestData {
VoiceUsers.add(liveMeeting.voiceUsers, vu5)
for (i <- 1 to 50) {
val guser = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, guest = false, authed = true, CallingWith.WEBRTC, muted = false,
val guser = createUserVoiceAndCam(liveMeeting, Roles.MODERATOR_ROLE, bot = false, guest = false, authed = true, CallingWith.WEBRTC, muted = false,
talking = false, listenOnly = false)
Users2x.add(liveMeeting.users2x, guser)
}
}
def createUserVoiceAndCam(liveMeeting: LiveMeeting, role: String, guest: Boolean, authed: Boolean, callingWith: String,
def createUserVoiceAndCam(liveMeeting: LiveMeeting, role: String, bot: Boolean, guest: Boolean, authed: Boolean, callingWith: String,
muted: Boolean, talking: Boolean, listenOnly: Boolean): UserState = {
val ruser1 = FakeUserGenerator.createFakeRegisteredUser(liveMeeting.registeredUsers, Roles.MODERATOR_ROLE, true, false, liveMeeting.props.meetingProp.intId)
val ruser1 = FakeUserGenerator.createFakeRegisteredUser(liveMeeting.registeredUsers, Roles.MODERATOR_ROLE, bot = false, true, false, liveMeeting.props.meetingProp.intId)
val vuser1 = FakeUserGenerator.createFakeVoiceUser(ruser1, "webrtc", muted = false, talking = true, listenOnly = false)
VoiceUsers.add(liveMeeting.voiceUsers, vuser1)
@ -70,7 +70,7 @@ trait FakeTestData {
def createFakeUser(liveMeeting: LiveMeeting, regUser: RegisteredUser): UserState = {
UserState(intId = regUser.id, extId = regUser.externId, meetingId = regUser.meetingId,
name = regUser.name, role = regUser.role, pin = false,
mobile = false, guest = regUser.guest, authed = regUser.authed, guestStatus = regUser.guestStatus,
mobile = false, bot = regUser.bot, guest = regUser.guest, authed = regUser.authed, guestStatus = regUser.guestStatus,
reactionEmoji = "none", raiseHand = false, away = false, locked = false, presenter = false,
avatar = regUser.avatarURL, webcamBackground = regUser.webcamBackgroundURL, color = "#ff6242", clientType = "unknown", userLeftFlag = UserLeftFlag(false, 0))
}

View File

@ -45,7 +45,7 @@ object FakeUserGenerator {
private def getRandomElement(list: Seq[String], random: Random): String = list(random.nextInt(list.length))
def createFakeRegisteredUser(users: RegisteredUsers, role: String, guest: Boolean, authed: Boolean, meetingId: String): RegisteredUser = {
def createFakeRegisteredUser(users: RegisteredUsers, role: String, bot: Boolean, guest: Boolean, authed: Boolean, meetingId: String): RegisteredUser = {
val name = getRandomElement(firstNames, random) + " " + getRandomElement(lastNames, random)
val id = "w_" + RandomStringGenerator.randomAlphanumericString(16)
val extId = RandomStringGenerator.randomAlphanumericString(16)
@ -58,7 +58,8 @@ object FakeUserGenerator {
val color = "#ff6242"
val ru = RegisteredUsers.create(meetingId, userId = id, extId, name, role,
authToken, Vector(sessionToken), avatarURL, webcamBackgroundURL, color, guest, authed, guestStatus = GuestStatus.ALLOW, false, "", Map(), false)
authToken, Vector(sessionToken), avatarURL, webcamBackgroundURL, color, bot,
guest, authed, guestStatus = GuestStatus.ALLOW, false, "", Map(), false)
RegisteredUsers.add(users, ru, meetingId)
ru
}

View File

@ -6,7 +6,7 @@ import org.bigbluebutton.core.util.RandomStringGenerator
object TestDataGen {
def createRegisteredUser(meetingId: String, users: RegisteredUsers, name: String, role: String,
guest: Boolean, authed: Boolean, waitForApproval: Boolean): RegisteredUser = {
bot: Boolean, guest: Boolean, authed: Boolean, waitForApproval: Boolean): RegisteredUser = {
val id = "w_" + RandomStringGenerator.randomAlphanumericString(16)
val extId = RandomStringGenerator.randomAlphanumericString(16)
val authToken = RandomStringGenerator.randomAlphanumericString(16)
@ -18,7 +18,8 @@ object TestDataGen {
val color = "#ff6242"
val ru = RegisteredUsers.create(meetingId, userId = id, extId, name, role,
authToken, Vector(sessionToken), avatarURL, webcamBackgroundURL, color, guest, authed, GuestStatus.ALLOW, false, "", Map(), false)
authToken, Vector(sessionToken), avatarURL, webcamBackgroundURL, color, bot,
guest, authed, GuestStatus.ALLOW, false, "", Map(), false)
RegisteredUsers.add(users, ru, meetingId = "test")
ru
@ -76,7 +77,7 @@ object TestDataGen {
def createUserFor(liveMeeting: LiveMeeting, regUser: RegisteredUser, presenter: Boolean): UserState = {
val u = UserState(intId = regUser.id, extId = regUser.externId, meetingId = regUser.meetingId, name = regUser.name,
role = regUser.role, guest = regUser.guest, authed = regUser.authed, guestStatus = regUser.guestStatus,
role = regUser.role,bot = regUser.bot, guest = regUser.guest, authed = regUser.authed, guestStatus = regUser.guestStatus,
reactionEmoji = "none", raiseHand = false, away = false, pin = false, mobile = false,
locked = false, presenter = false, avatar = regUser.avatarURL, regUser.webcamBackgroundURL, color = "#ff6242",
clientType = "unknown", userLeftFlag = UserLeftFlag(false, 0))

View File

@ -121,7 +121,7 @@ case class AnswerVO(id: Int, key: String, text: Option[String], responders: Opti
case class QuestionVO(id: Int, questionType: String, multiResponse: Boolean, questionText: Option[String], answers: Option[Array[AnswerVO]])
case class PollVO(id: String, questions: Array[QuestionVO], title: Option[String], started: Boolean, stopped: Boolean, showResult: Boolean, isSecret: Boolean)
case class UserVO(id: String, externalId: String, name: String, role: String,
case class UserVO(id: String, externalId: String, name: String, role: String, bot: Boolean,
guest: Boolean, authed: Boolean, guestStatus: String, emojiStatus: String,
presenter: Boolean, hasStream: Boolean, locked: Boolean, webcamStreams: Set[String],
phoneUser: Boolean, voiceUser: VoiceUserVO, listenOnly: Boolean, avatarURL: String,

View File

@ -7,8 +7,9 @@ case class RegisterUserReqMsg(
) extends BbbCoreMsg
case class RegisterUserReqMsgBody(meetingId: String, intUserId: String, name: String, role: String,
extUserId: String, authToken: String, sessionToken: String, avatarURL: String,
webcamBackgroundURL: String, guest: Boolean, authed: Boolean, guestStatus: String,
excludeFromDashboard: Boolean, enforceLayout: String, userMetadata: Map[String, String])
webcamBackgroundURL: String, bot: Boolean, guest: Boolean, authed: Boolean,
guestStatus: String, excludeFromDashboard: Boolean, enforceLayout: String,
userMetadata: Map[String, String])
object UserRegisteredRespMsg { val NAME = "UserRegisteredRespMsg" }
case class UserRegisteredRespMsg(
@ -88,6 +89,7 @@ case class UserJoinedMeetingEvtMsgBody(
extId: String,
name: String,
role: String,
bot: Boolean,
guest: Boolean,
authed: Boolean,
guestStatus: String,

View File

@ -134,12 +134,12 @@ public class MeetingService implements MessageListener {
public void registerUser(String meetingID, String internalUserId,
String fullname, String role, String externUserID,
String authToken, String sessionToken, String avatarURL, String webcamBackgroundURL, Boolean guest,
Boolean authed, String guestStatus, Boolean excludeFromDashboard, Boolean leftGuestLobby,
String authToken, String sessionToken, String avatarURL, String webcamBackgroundURL, Boolean bot,
Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard, Boolean leftGuestLobby,
String enforceLayout, Map<String, String> userMetadata) {
handle(
new RegisterUser(meetingID, internalUserId, fullname, role,
externUserID, authToken, sessionToken, avatarURL, webcamBackgroundURL, guest, authed, guestStatus,
externUserID, authToken, sessionToken, avatarURL, webcamBackgroundURL, bot, guest, authed, guestStatus,
excludeFromDashboard, leftGuestLobby, enforceLayout, userMetadata
)
);
@ -572,8 +572,8 @@ public class MeetingService implements MessageListener {
private void processRegisterUser(RegisterUser message) {
gw.registerUser(message.meetingID,
message.internalUserId, message.fullname, message.role,
message.externUserID, message.authToken, message.sessionToken, message.avatarURL, message.webcamBackgroundURL, message.guest,
message.authed, message.guestStatus, message.excludeFromDashboard, message.enforceLayout, message.userMetadata);
message.externUserID, message.authToken, message.sessionToken, message.avatarURL, message.webcamBackgroundURL, message.bot,
message.guest, message.authed, message.guestStatus, message.excludeFromDashboard, message.enforceLayout, message.userMetadata);
}
private void processRegisterUserSessionToken(RegisterUserSessionToken message) {
@ -1073,8 +1073,8 @@ public class MeetingService implements MessageListener {
}
User user = new User(message.userId, message.externalUserId,
message.name, message.role, message.locked, message.avatarURL, message.webcamBackgroundURL, message.guest, message.guestStatus,
message.clientType);
message.name, message.role, message.locked, message.avatarURL, message.webcamBackgroundURL, message.bot,
message.guest, message.guestStatus, message.clientType);
if(m.getMaxUsers() > 0 && m.countUniqueExtIds() >= m.getMaxUsers()) {
m.removeEnteredUser(user.getInternalUserId());
@ -1096,6 +1096,7 @@ public class MeetingService implements MessageListener {
logData.put("externalUserId", user.getExternalUserId());
logData.put("username", user.getFullname());
logData.put("role", user.getRole());
logData.put("bot", user.isBot());
logData.put("guest", user.isGuest());
logData.put("guestStatus", user.getGuestStatus());
logData.put("logCode", "user_joined_message");
@ -1192,9 +1193,10 @@ public class MeetingService implements MessageListener {
user.setVoiceJoined(true);
} else {
if (message.userId.startsWith("v_")) {
Boolean bot = false;
// A dial-in user joined the meeting. Dial-in users by convention has userId that starts with "v_".
User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", true, "", "",
true, GuestPolicy.ALLOW, "DIAL-IN");
bot, true, GuestPolicy.ALLOW, "DIAL-IN");
vuser.setVoiceJoined(true);
m.userJoined(vuser);
}

View File

@ -34,6 +34,7 @@ public class User {
private String avatarURL;
private String webcamBackgroundURL;
private Map<String,String> status;
private Boolean bot;
private Boolean guest;
private String guestStatus;
private Boolean listeningOnly = false;
@ -49,6 +50,7 @@ public class User {
Boolean locked,
String avatarURL,
String webcamBackgroundURL,
Boolean bot,
Boolean guest,
String guestStatus,
String clientType) {
@ -59,6 +61,7 @@ public class User {
this.locked = locked;
this.avatarURL = avatarURL;
this.webcamBackgroundURL = webcamBackgroundURL;
this.bot = bot;
this.guest = guest;
this.guestStatus = guestStatus;
this.status = new ConcurrentHashMap<>();
@ -81,6 +84,14 @@ public class User {
this.externalUserId = externalUserId;
}
public void setBot(Boolean bot) {
this.bot = bot;
}
public Boolean isBot() {
return this.bot;
}
public void setGuest(Boolean guest) {
this.guest = guest;
}

View File

@ -32,6 +32,7 @@ public class UserSession {
public String role = null;
public String conference = null;
public String room = null;
public Boolean bot = false;
public Boolean guest = false;
public Boolean authed = false;
public String voicebridge = null;

View File

@ -14,6 +14,7 @@ public class RegisterUser implements IMessage {
public final String sessionToken;
public final String avatarURL;
public final String webcamBackgroundURL;
public final Boolean bot;
public final Boolean guest;
public final Boolean authed;
public final String guestStatus;
@ -23,7 +24,7 @@ public class RegisterUser implements IMessage {
public final Map<String, String> userMetadata;
public RegisterUser(String meetingID, String internalUserId, String fullname, String role, String externUserID,
String authToken, String sessionToken, String avatarURL, String webcamBackgroundURL, Boolean guest,
String authToken, String sessionToken, String avatarURL, String webcamBackgroundURL, Boolean bot, Boolean guest,
Boolean authed, String guestStatus, Boolean excludeFromDashboard, Boolean leftGuestLobby,
String enforceLayout, Map<String, String> userMetadata) {
this.meetingID = meetingID;
@ -35,6 +36,7 @@ public class RegisterUser implements IMessage {
this.sessionToken = sessionToken;
this.avatarURL = avatarURL;
this.webcamBackgroundURL = webcamBackgroundURL;
this.bot = bot;
this.guest = guest;
this.authed = authed;
this.guestStatus = guestStatus;

View File

@ -9,6 +9,7 @@ public class UserJoined implements IMessage {
public final Boolean locked;
public final String avatarURL;
public final String webcamBackgroundURL;
public final Boolean bot;
public final Boolean guest;
public final String guestStatus;
public final String clientType;
@ -22,6 +23,7 @@ public class UserJoined implements IMessage {
Boolean locked,
String avatarURL,
String webcamBackgroundURL,
Boolean bot,
Boolean guest,
String guestStatus,
String clientType) {
@ -33,6 +35,7 @@ public class UserJoined implements IMessage {
this.locked = locked;
this.avatarURL = avatarURL;
this.webcamBackgroundURL = webcamBackgroundURL;
this.bot = bot;
this.guest = guest;
this.guestStatus = guestStatus;
this.clientType = clientType;

View File

@ -22,8 +22,8 @@ public interface IPublisherService {
void endMeeting(String meetingId);
void send(String channel, String message);
void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID,
String authToken, String avatarURL, String webcamBackgroundURL, Boolean guest, Boolean excludeFromDashboard,
String enforceLayout, Boolean authed);
String authToken, String avatarURL, String webcamBackgroundURL, Boolean bot, Boolean guest,
Boolean excludeFromDashboard, String enforceLayout, Boolean authed);
void sendKeepAlive(String system, Long bbbWebTimestamp, Long akkaAppsTimestamp);
void sendStunTurnInfo(String meetingId, String internalUserId, Set<StunServer> stuns, Set<TurnEntry> turns);
}

View File

@ -74,7 +74,7 @@ public interface IBbbWebApiGWApp {
void registerUser(String meetingID, String internalUserId, String fullname, String role,
String externUserID, String authToken, String sessionToken, String avatarURL, String webcamBackgroundURL,
Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard,
Boolean bot, Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard,
String enforceLayout, Map<String, String> userMetadata);
void registerUserSessionToken(String meetingID, String internalUserId, String sessionToken,
String replaceSessionToken, String enforceLayout, Map<String, String> userSessionMetadata);

View File

@ -290,8 +290,8 @@ class BbbWebApiGWApp(
def registerUser(meetingId: String, intUserId: String, name: String,
role: String, extUserId: String, authToken: String, sessionToken: String,
avatarURL: String, webcamBackgroundURL: String, guest: java.lang.Boolean, authed: java.lang.Boolean,
guestStatus: String, excludeFromDashboard: java.lang.Boolean,
avatarURL: String, webcamBackgroundURL: String, bot: java.lang.Boolean, guest: java.lang.Boolean,
authed: java.lang.Boolean, guestStatus: String, excludeFromDashboard: java.lang.Boolean,
enforceLayout: String, userMetadata: java.util.Map[String, String]): Unit = {
// meetingManagerActorRef ! new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name,
@ -300,9 +300,9 @@ class BbbWebApiGWApp(
val regUser = new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name,
role = role, extUserId = extUserId, authToken = authToken, sessionToken = sessionToken,
avatarURL = avatarURL, webcamBackgroundURL = webcamBackgroundURL, guest = guest.booleanValue(), authed = authed.booleanValue(),
guestStatus = guestStatus, excludeFromDashboard = excludeFromDashboard, enforceLayout = enforceLayout,
userMetadata = (userMetadata).asScala.toMap)
avatarURL = avatarURL, webcamBackgroundURL = webcamBackgroundURL, bot = bot.booleanValue(), guest = guest.booleanValue(),
authed = authed.booleanValue(), guestStatus = guestStatus, excludeFromDashboard = excludeFromDashboard,
enforceLayout = enforceLayout, userMetadata = (userMetadata).asScala.toMap)
val event = MsgBuilder.buildRegisterUserRequestToAkkaApps(regUser)
msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event))

View File

@ -50,8 +50,9 @@ object MsgBuilder {
val header = BbbCoreHeaderWithMeetingId(RegisterUserReqMsg.NAME, msg.meetingId)
val body = RegisterUserReqMsgBody(meetingId = msg.meetingId, intUserId = msg.intUserId,
name = msg.name, role = msg.role, extUserId = msg.extUserId, authToken = msg.authToken, sessionToken = msg.sessionToken,
avatarURL = msg.avatarURL, webcamBackgroundURL = msg.webcamBackgroundURL, guest = msg.guest, authed = msg.authed, guestStatus = msg.guestStatus,
excludeFromDashboard = msg.excludeFromDashboard, enforceLayout = msg.enforceLayout, userMetadata = msg.userMetadata)
avatarURL = msg.avatarURL, webcamBackgroundURL = msg.webcamBackgroundURL, bot = msg.bot, guest = msg.guest, authed = msg.authed,
guestStatus = msg.guestStatus, excludeFromDashboard = msg.excludeFromDashboard, enforceLayout = msg.enforceLayout,
userMetadata = msg.userMetadata)
val req = RegisterUserReqMsg(header, body)
BbbCommonEnvCoreMsg(envelope, req)
}

View File

@ -17,7 +17,7 @@ case class CreateBreakoutRoomMsg(meetingId: String, parentMeetingId: String,
case class AddUserSession(token: String, session: UserSession)
case class RegisterUser(meetingId: String, intUserId: String, name: String, role: String,
extUserId: String, authToken: String, sessionToken: String, avatarURL: String, webcamBackgroundURL: String,
guest: Boolean, authed: Boolean, guestStatus: String, excludeFromDashboard: Boolean,
bot: Boolean, guest: Boolean, authed: Boolean, guestStatus: String, excludeFromDashboard: Boolean,
enforceLayout: String, userMetadata: Map[String, String])
case class CreateMeetingMsg(defaultProps: DefaultProps)

View File

@ -143,7 +143,7 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
def handleUserJoinedMeetingEvtMsg(msg: UserJoinedMeetingEvtMsg): Unit = {
olgMsgGW.handle(new UserJoined(msg.header.meetingId, msg.body.intId,
msg.body.extId, msg.body.name, msg.body.role, msg.body.locked, msg.body.avatar, msg.body.webcamBackground,
msg.body.guest, msg.body.guestStatus, msg.body.clientType))
msg.body.bot, msg.body.guest, msg.body.guestStatus, msg.body.clientType))
}
def handlePresenterUnassignedEvtMsg(msg: PresenterUnassignedEvtMsg): Unit = {

View File

@ -28,8 +28,8 @@ trait ToAkkaAppsSendersTrait extends SystemConfiguration {
val header = BbbCoreHeaderWithMeetingId(RegisterUserReqMsg.NAME, msg.meetingId)
val body = RegisterUserReqMsgBody(meetingId = msg.meetingId, intUserId = msg.intUserId,
name = msg.name, role = msg.role, extUserId = msg.extUserId, authToken = msg.authToken,
sessionToken = msg.sessionToken, avatarURL = msg.avatarURL, webcamBackgroundURL = msg.webcamBackgroundURL, guest = msg.guest, authed = msg.authed,
guestStatus = msg.guestStatus, excludeFromDashboard = msg.excludeFromDashboard,
sessionToken = msg.sessionToken, avatarURL = msg.avatarURL, webcamBackgroundURL = msg.webcamBackgroundURL, bot = msg.bot,
guest = msg.guest, authed = msg.authed, guestStatus = msg.guestStatus, excludeFromDashboard = msg.excludeFromDashboard,
enforceLayout = msg.enforceLayout, userMetadata = msg.userMetadata)
val req = RegisterUserReqMsg(header, body)
val message = BbbCommonEnvCoreMsg(envelope, req)

View File

@ -276,6 +276,7 @@ CREATE TABLE "user" (
"joinErrorMessage" varchar(400),
"banned" bool,
"loggedOut" bool, -- when user clicked Leave meeting button
"bot" bool, -- used to flag au
"guest" bool, --used for dialIn
"guestStatus" varchar(50),
"registeredOn" bigint,
@ -359,6 +360,7 @@ AS SELECT "user"."userId",
"user"."raiseHandTime",
"user"."reactionEmoji",
"user"."reactionEmojiTime",
"user"."bot",
"user"."guest",
"user"."guestStatus",
"user"."mobile",

View File

@ -301,6 +301,11 @@ class ApiController {
authenticated = true
}
Boolean bot = false;
if(!StringUtils.isEmpty(params.bot)) {
bot = Boolean.parseBoolean(params.bot)
}
if (!StringUtils.isEmpty(params.auth)) {
authenticated = Boolean.parseBoolean(params.auth)
@ -435,6 +440,7 @@ class ApiController {
us.mode = "LIVE"
us.record = meeting.isRecord()
us.welcome = meeting.getWelcomeMessage()
us.bot = bot
us.guest = guest
us.authed = authenticated
us.guestStatus = guestStatusVal
@ -494,6 +500,7 @@ class ApiController {
sessionToken,
us.avatarURL,
us.webcamBackgroundURL,
us.bot,
us.guest,
us.authed,
guestStatusVal,