diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/RegisterUserReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/RegisterUserReqMsgHdlr.scala index ee2cf9decc..dd23fc6462 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/RegisterUserReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/RegisterUserReqMsgHdlr.scala @@ -63,7 +63,7 @@ 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, msg.body.sessionToken, msg.body.avatarURL, ColorPicker.nextColor(liveMeeting.props.meetingProp.intId), msg.body.guest, msg.body.authed, - guestStatus, msg.body.excludeFromDashboard, msg.body.enforceLayout, msg.body.customParameters, false) + guestStatus, msg.body.excludeFromDashboard, msg.body.enforceLayout, msg.body.userMetadata, false) checkUserConcurrentAccesses(regUser) RegisteredUsers.add(liveMeeting.registeredUsers, regUser, liveMeeting.props.meetingProp.intId) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserCustomParameter.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserCustomParameter.scala deleted file mode 100644 index 03f12bf590..0000000000 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserCustomParameter.scala +++ /dev/null @@ -1,39 +0,0 @@ -package org.bigbluebutton.core.db - -import slick.jdbc.PostgresProfile.api._ -import slick.lifted.{ ProvenShape } - -case class UserCustomParameterDbModel( - meetingId: String, - userId: String, - parameter: String, - value: String -) - -class UserCustomParameterDbTableDef(tag: Tag) extends Table[UserCustomParameterDbModel](tag, "user_customParameter") { - val meetingId = column[String]("meetingId", O.PrimaryKey) - val userId = column[String]("userId", O.PrimaryKey) - val parameter = column[String]("parameter", O.PrimaryKey) - val value = column[String]("value") - - override def * : ProvenShape[UserCustomParameterDbModel] = (meetingId, userId, parameter, value) <> (UserCustomParameterDbModel.tupled, UserCustomParameterDbModel.unapply) -} - -object UserCustomParameterDAO { - def insert(meetingId: String, userId: String, customParameters: Map[String, String]) = { - DatabaseConnection.enqueue(DBIO.sequence( - for { - parameter <- customParameters - } yield { - TableQuery[UserCustomParameterDbTableDef].insertOrUpdate( - UserCustomParameterDbModel( - meetingId = meetingId, - userId = userId, - parameter = parameter._1, - value = parameter._2 - ) - ) - } - ).transactionally) - } -} \ No newline at end of file diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserDAO.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserDAO.scala index 18a57603af..324456419a 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserDAO.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserDAO.scala @@ -86,7 +86,7 @@ object UserDAO { ) UserConnectionStatusDAO.insert(meetingId, regUser.id) - UserCustomParameterDAO.insert(meetingId, regUser.id, regUser.customParameters) + UserMetadataDAO.insert(meetingId, regUser.id, regUser.userMetadata) UserClientSettingsDAO.insertOrUpdate(meetingId, regUser.id, JsonUtils.stringToJson("{}")) ChatUserDAO.insertUserPublicChat(meetingId, regUser.id) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserMetadata.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserMetadata.scala new file mode 100644 index 0000000000..b656ac2f12 --- /dev/null +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/UserMetadata.scala @@ -0,0 +1,39 @@ +package org.bigbluebutton.core.db + +import slick.jdbc.PostgresProfile.api._ +import slick.lifted.{ ProvenShape } + +case class UserMetadataDbModel( + meetingId: String, + userId: String, + parameter: String, + value: String +) + +class UserMetadataDbTableDef(tag: Tag) extends Table[UserMetadataDbModel](tag, "user_metadata") { + val meetingId = column[String]("meetingId", O.PrimaryKey) + val userId = column[String]("userId", O.PrimaryKey) + val parameter = column[String]("parameter", O.PrimaryKey) + val value = column[String]("value") + + override def * : ProvenShape[UserMetadataDbModel] = (meetingId, userId, parameter, value) <> (UserMetadataDbModel.tupled, UserMetadataDbModel.unapply) +} + +object UserMetadataDAO { + def insert(meetingId: String, userId: String, userMetadata: Map[String, String]) = { + DatabaseConnection.enqueue(DBIO.sequence( + for { + metadata <- userMetadata + } yield { + TableQuery[UserMetadataDbTableDef].insertOrUpdate( + UserMetadataDbModel( + meetingId = meetingId, + userId = userId, + parameter = metadata._1, + value = metadata._2 + ) + ) + } + ).transactionally) + } +} diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala index a0244771be..b46db76cc8 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala @@ -8,7 +8,7 @@ object RegisteredUsers { def create(meetingId: String, userId: String, extId: String, name: String, roles: String, authToken: String, sessionToken: String, avatar: String, color: String, guest: Boolean, authenticated: Boolean, guestStatus: String, excludeFromDashboard: Boolean, enforceLayout: String, - customParameters: Map[String, String], loggedOut: Boolean): RegisteredUser = { + userMetadata: Map[String, String], loggedOut: Boolean): RegisteredUser = { new RegisteredUser( userId, extId, @@ -31,7 +31,7 @@ object RegisteredUsers { ejected = false, banned = false, enforceLayout, - customParameters, + userMetadata, loggedOut, ) } @@ -252,7 +252,7 @@ case class RegisteredUser( ejected: Boolean, banned: Boolean, enforceLayout: String, - customParameters: Map[String,String], + userMetadata: Map[String,String], loggedOut: Boolean, lastBreakoutRoom: BreakoutRoom2x = null, ) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala index 131ff378db..4ad118a888 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Users2x.scala @@ -451,7 +451,7 @@ case class UserState( userLeftFlag: UserLeftFlag, speechLocale: String = "", captionLocale: String = "", - customParameters: Map[String, String] = Map.empty + userMetadata: Map[String, String] = Map.empty ) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/ParticipantJoinRecordEvent.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/ParticipantJoinRecordEvent.scala index 50fd1cf2f4..1b10e32b9a 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/ParticipantJoinRecordEvent.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/ParticipantJoinRecordEvent.scala @@ -47,8 +47,8 @@ class ParticipantJoinRecordEvent extends AbstractParticipantRecordEvent { eventMap.put(ROLE, role) } - def setUserdata(customParameters: Map[String, String]): Unit = { - eventMap.put(USER_DATA, customParameters.toJson.compactPrint) + def setUserdata(userMetadata: Map[String, String]): Unit = { + eventMap.put(USER_DATA, userMetadata.toJson.compactPrint) } } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/HandlerHelpers.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/HandlerHelpers.scala index 94a38931a2..647baf03a7 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/HandlerHelpers.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/HandlerHelpers.scala @@ -75,7 +75,7 @@ trait HandlerHelpers extends SystemConfiguration { color = regUser.color, clientType = clientType, userLeftFlag = UserLeftFlag(false, 0), - customParameters = regUser.customParameters + userMetadata = regUser.userMetadata ) } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/UserJoinedMeetingEvtMsgBuilder.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/UserJoinedMeetingEvtMsgBuilder.scala index 5954e5091f..96c4234ef0 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/UserJoinedMeetingEvtMsgBuilder.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/senders/UserJoinedMeetingEvtMsgBuilder.scala @@ -18,7 +18,7 @@ object UserJoinedMeetingEvtMsgBuilder { pin = userState.pin, presenter = userState.presenter, locked = userState.locked, avatar = userState.avatar, color = userState.color, clientType = userState.clientType, - customParameters = userState.customParameters) + userMetadata = userState.userMetadata) val event = UserJoinedMeetingEvtMsg(meetingId, userState.intId, body) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala index 986ec96b9c..bfcc832972 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala @@ -352,7 +352,7 @@ class RedisRecorderActor( ev.setExternalUserId(msg.body.extId) ev.setName(msg.body.name) ev.setRole(msg.body.role) - ev.setUserdata(msg.body.customParameters) + ev.setUserdata(msg.body.userMetadata) record(msg.header.meetingId, ev.toMap.asJava) } diff --git a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala index d95cc55a91..ce1912affa 100755 --- a/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala +++ b/bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala @@ -8,7 +8,7 @@ case class RegisterUserReqMsg( case class RegisterUserReqMsgBody(meetingId: String, intUserId: String, name: String, role: String, extUserId: String, authToken: String, sessionToken: String, avatarURL: String, guest: Boolean, authed: Boolean, guestStatus: String, excludeFromDashboard: Boolean, - enforceLayout: String, customParameters: Map[String, String]) + enforceLayout: String, userMetadata: Map[String, String]) object UserRegisteredRespMsg { val NAME = "UserRegisteredRespMsg" } case class UserRegisteredRespMsg( @@ -90,24 +90,24 @@ case class UserJoinedMeetingEvtMsg( body: UserJoinedMeetingEvtMsgBody ) extends BbbCoreMsg case class UserJoinedMeetingEvtMsgBody( - intId: String, - extId: String, - name: String, - role: String, - guest: Boolean, - authed: Boolean, - guestStatus: String, - emoji: String, - reactionEmoji: String, - raiseHand: Boolean, - away: Boolean, - pin: Boolean, - presenter: Boolean, - locked: Boolean, - avatar: String, - color: String, - clientType: String, - customParameters: Map[String, String] + intId: String, + extId: String, + name: String, + role: String, + guest: Boolean, + authed: Boolean, + guestStatus: String, + emoji: String, + reactionEmoji: String, + raiseHand: Boolean, + away: Boolean, + pin: Boolean, + presenter: Boolean, + locked: Boolean, + avatar: String, + color: String, + clientType: String, + userMetadata: Map[String, String] ) /** diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index 6992394e69..16a57e2c9b 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -124,11 +124,11 @@ public class MeetingService implements MessageListener { String fullname, String role, String externUserID, String authToken, String sessionToken, String avatarURL, Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard, Boolean leftGuestLobby, - String enforceLayout, Map customParameters) { + String enforceLayout, Map userMetadata) { handle( new RegisterUser(meetingID, internalUserId, fullname, role, externUserID, authToken, sessionToken, avatarURL, guest, authed, guestStatus, - excludeFromDashboard, leftGuestLobby, enforceLayout, customParameters + excludeFromDashboard, leftGuestLobby, enforceLayout, userMetadata ) ); @@ -447,7 +447,7 @@ public class MeetingService implements MessageListener { gw.registerUser(message.meetingID, message.internalUserId, message.fullname, message.role, message.externUserID, message.authToken, message.sessionToken, message.avatarURL, message.guest, - message.authed, message.guestStatus, message.excludeFromDashboard, message.enforceLayout, message.customParameters); + message.authed, message.guestStatus, message.excludeFromDashboard, message.enforceLayout, message.userMetadata); } public Meeting getMeeting(String meetingId) { diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/RegisterUser.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/RegisterUser.java index fb0b0b35aa..6c672c5b5d 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/RegisterUser.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/messaging/messages/RegisterUser.java @@ -19,12 +19,12 @@ public class RegisterUser implements IMessage { public final Boolean excludeFromDashboard; public final Boolean leftGuestLobby; public final String enforceLayout; - public final Map customParameters; + public final Map userMetadata; public RegisterUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken, String sessionToken, String avatarURL, Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard, Boolean leftGuestLobby, - String enforceLayout, Map customParameters) { + String enforceLayout, Map userMetadata) { this.meetingID = meetingID; this.internalUserId = internalUserId; this.fullname = fullname; @@ -39,6 +39,6 @@ public class RegisterUser implements IMessage { this.excludeFromDashboard = excludeFromDashboard; this.leftGuestLobby = leftGuestLobby; this.enforceLayout = enforceLayout; - this.customParameters = customParameters; + this.userMetadata = userMetadata; } } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java b/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java index ded0b59120..e82dccf8ea 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api2/IBbbWebApiGWApp.java @@ -73,7 +73,7 @@ public interface IBbbWebApiGWApp { void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken, String sessionToken, String avatarURL, Boolean guest, Boolean authed, String guestStatus, Boolean excludeFromDashboard, - String enforceLayout, Map customParameters); + String enforceLayout, Map userMetadata); void destroyMeeting(DestroyMeetingMessage msg); void endMeeting(EndMeetingMessage msg); diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala index ad76462393..08e07dc65f 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala @@ -286,7 +286,7 @@ class BbbWebApiGWApp( role: String, extUserId: String, authToken: String, sessionToken: String, avatarURL: String, guest: java.lang.Boolean, authed: java.lang.Boolean, guestStatus: String, excludeFromDashboard: java.lang.Boolean, - enforceLayout: String, customParameters: java.util.Map[String, String]): Unit = { + enforceLayout: String, userMetadata: java.util.Map[String, String]): Unit = { // meetingManagerActorRef ! new RegisterUser(meetingId = meetingId, intUserId = intUserId, name = name, // role = role, extUserId = extUserId, authToken = authToken, avatarURL = avatarURL, @@ -296,7 +296,7 @@ class BbbWebApiGWApp( role = role, extUserId = extUserId, authToken = authToken, sessionToken = sessionToken, avatarURL = avatarURL, guest = guest.booleanValue(), authed = authed.booleanValue(), guestStatus = guestStatus, excludeFromDashboard = excludeFromDashboard, enforceLayout = enforceLayout, - customParameters = (customParameters).asScala.toMap) + userMetadata = (userMetadata).asScala.toMap) val event = MsgBuilder.buildRegisterUserRequestToAkkaApps(regUser) msgToAkkaAppsEventBus.publish(MsgToAkkaApps(toAkkaAppsChannel, event)) diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala index 7afc3d59e9..155e6e9a8a 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala @@ -51,7 +51,7 @@ object MsgBuilder { 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, guest = msg.guest, authed = msg.authed, guestStatus = msg.guestStatus, - excludeFromDashboard = msg.excludeFromDashboard, enforceLayout = msg.enforceLayout, customParameters = msg.customParameters) + excludeFromDashboard = msg.excludeFromDashboard, enforceLayout = msg.enforceLayout, userMetadata = msg.userMetadata) val req = RegisterUserReqMsg(header, body) BbbCommonEnvCoreMsg(envelope, req) } diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala index 2b17a8006d..3d0b6d5740 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala @@ -18,7 +18,7 @@ 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, guest: Boolean, authed: Boolean, guestStatus: String, excludeFromDashboard: Boolean, - enforceLayout: String, customParameters: Map[String, String]) + enforceLayout: String, userMetadata: Map[String, String]) case class CreateMeetingMsg(defaultProps: DefaultProps) diff --git a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala index 7f11d06304..1aff3dbad5 100755 --- a/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala +++ b/bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/ToAkkaAppsSendersTrait.scala @@ -30,7 +30,7 @@ trait ToAkkaAppsSendersTrait extends SystemConfiguration { name = msg.name, role = msg.role, extUserId = msg.extUserId, authToken = msg.authToken, sessionToken = msg.sessionToken, avatarURL = msg.avatarURL, guest = msg.guest, authed = msg.authed, guestStatus = msg.guestStatus, excludeFromDashboard = msg.excludeFromDashboard, - enforceLayout = msg.enforceLayout, customParameters = msg.customParameters) + enforceLayout = msg.enforceLayout, userMetadata = msg.userMetadata) val req = RegisterUserReqMsg(header, body) val message = BbbCommonEnvCoreMsg(envelope, req) sendToBus(message) diff --git a/bbb-graphql-server/bbb_schema.sql b/bbb-graphql-server/bbb_schema.sql index bad970946f..1120f7f717 100644 --- a/bbb-graphql-server/bbb_schema.sql +++ b/bbb-graphql-server/bbb_schema.sql @@ -551,19 +551,19 @@ AS SELECT "user"."isOnline" FROM "user"; -create table "user_customParameter"( +create table "user_metadata"( "meetingId" varchar(100), "userId" varchar(50), "parameter" varchar(255), "value" varchar(255), - CONSTRAINT "user_customParameter_pkey" PRIMARY KEY ("meetingId", "userId","parameter"), + CONSTRAINT "user_metadata_pkey" PRIMARY KEY ("meetingId", "userId","parameter"), FOREIGN KEY ("meetingId", "userId") REFERENCES "user"("meetingId","userId") ON DELETE CASCADE ); -create index "idx_user_customParameter_pk_reverse" on "user_customParameter" ("userId", "meetingId"); +create index "idx_user_metadata_pk_reverse" on "user_metadata" ("userId", "meetingId"); -CREATE VIEW "v_user_customParameter" AS +CREATE VIEW "v_user_metadata" AS SELECT * -FROM "user_customParameter"; +FROM "user_metadata"; CREATE VIEW "v_user_welcomeMsgs" AS SELECT diff --git a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_current.yaml b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_current.yaml index 8c0c737071..8dfb176903 100644 --- a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_current.yaml +++ b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_current.yaml @@ -16,14 +16,14 @@ object_relationships: remote_table: name: v_user_connectionStatus schema: public - - name: customParameters + - name: userMetadata using: manual_configuration: column_mapping: userId: userId insertion_order: null remote_table: - name: v_user_customParameter + name: v_user_metadata schema: public - name: guestStatusDetails using: diff --git a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_customParameter.yaml b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_metadata.yaml similarity index 84% rename from bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_customParameter.yaml rename to bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_metadata.yaml index 93fd1fc1b2..7e63486977 100644 --- a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_customParameter.yaml +++ b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_user_metadata.yaml @@ -1,10 +1,10 @@ table: - name: v_user_customParameter + name: v_user_metadata schema: public configuration: column_config: {} custom_column_names: {} - custom_name: user_customParameter + custom_name: user_metadata custom_root_fields: {} select_permissions: - role: bbb_client diff --git a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/tables.yaml b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/tables.yaml index 15a51aa3eb..100196630c 100644 --- a/bbb-graphql-server/metadata/databases/BigBlueButton/tables/tables.yaml +++ b/bbb-graphql-server/metadata/databases/BigBlueButton/tables/tables.yaml @@ -51,7 +51,7 @@ - "!include public_v_user_connectionStatus.yaml" - "!include public_v_user_connectionStatusReport.yaml" - "!include public_v_user_current.yaml" -- "!include public_v_user_customParameter.yaml" +- "!include public_v_user_metadata.yaml" - "!include public_v_user_guest.yaml" - "!include public_v_user_reaction.yaml" - "!include public_v_user_ref.yaml" diff --git a/bigbluebutton-html5/imports/ui/Types/user.ts b/bigbluebutton-html5/imports/ui/Types/user.ts index 66290f310a..006fbeba5c 100644 --- a/bigbluebutton-html5/imports/ui/Types/user.ts +++ b/bigbluebutton-html5/imports/ui/Types/user.ts @@ -39,7 +39,7 @@ export interface Voice { startTime: number; } -export interface CustomParameter { +export interface UserMetadata { parameter: string; value: string; } diff --git a/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/component.tsx b/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/component.tsx index 499fab36db..ab4e4deccd 100644 --- a/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/component.tsx +++ b/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/component.tsx @@ -1,6 +1,6 @@ import { useQuery } from '@apollo/client'; import React, { useEffect } from 'react'; -import { UserCustomParameterResponse, getCustomParameter } from './queries'; +import { UserMetadataResponse, getUserMetadata } from './queries'; import { setUserSettings } from '/imports/ui/core/local-states/useUserSettings'; interface CustomUsersSettingsProps { @@ -11,14 +11,14 @@ const CustomUsersSettings: React.FC = ({ children, }) => { const { - data: customParameterData, - loading: customParameterLoading, - error: customParameterError, - } = useQuery(getCustomParameter); + data: userMetadataData, + loading: userMetadataLoading, + error: userMetadataError, + } = useQuery(getUserMetadata); const [allowToRender, setAllowToRender] = React.useState(false); useEffect(() => { - if (customParameterData && !customParameterLoading) { - const filteredData = customParameterData.user_customParameter.map((uc) => { + if (userMetadataData && !userMetadataLoading) { + const filteredData = userMetadataData.user_metadata.map((uc) => { const { parameter, value } = uc; let parsedValue: string | boolean | string[] = ''; try { @@ -32,15 +32,15 @@ const CustomUsersSettings: React.FC = ({ setAllowToRender(true); } }, [ - customParameterData, - customParameterLoading, + userMetadataData, + userMetadataLoading, ]); useEffect(() => { - if (customParameterError) { - throw new Error(`Error on requesting custom parameter data: ${customParameterError}`); + if (userMetadataError) { + throw new Error(`Error on requesting custom parameter data: ${userMetadataError}`); } - }, [customParameterError]); + }, [userMetadataError]); return allowToRender ? <>{children} : null; }; diff --git a/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/queries.ts b/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/queries.ts index 7297febdf2..a54436fc57 100644 --- a/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/queries.ts +++ b/bigbluebutton-html5/imports/ui/components/join-handler/custom-users-settings/queries.ts @@ -1,17 +1,17 @@ import { gql } from '@apollo/client'; -interface CustomParameter { +interface UserMetadata { parameter: string; value: string; } -export interface UserCustomParameterResponse { - user_customParameter: CustomParameter[]; +export interface UserMetadataResponse { + user_metadata: UserMetadata[]; } -export const getCustomParameter = gql` - query getCustomParameter { - user_customParameter { +export const getUserMetadata = gql` + query getUserMetadata { + user_metadata { parameter value } @@ -19,5 +19,5 @@ export const getCustomParameter = gql` `; export default { - getCustomParameter, + getUserMetadata, }; diff --git a/bigbluebutton-html5/imports/ui/components/layout/initState.js b/bigbluebutton-html5/imports/ui/components/layout/initState.js index 632e1566c9..b86e19aaf5 100644 --- a/bigbluebutton-html5/imports/ui/components/layout/initState.js +++ b/bigbluebutton-html5/imports/ui/components/layout/initState.js @@ -2,7 +2,7 @@ import DEFAULT_VALUES from '/imports/ui/components/layout/defaultValues'; export const INITIAL_INPUT_STATE = { autoarrAngeLayout: true, - customParameters: { + userMetadata: { }, browser: { diff --git a/bigbluebutton-html5/imports/ui/components/layout/layoutTypes.ts b/bigbluebutton-html5/imports/ui/components/layout/layoutTypes.ts index d52f8bb3e8..dee1f13885 100644 --- a/bigbluebutton-html5/imports/ui/components/layout/layoutTypes.ts +++ b/bigbluebutton-html5/imports/ui/components/layout/layoutTypes.ts @@ -246,7 +246,7 @@ interface Input { bannerBar: BannerBar; browser: Browser; cameraDock: CameraDock - customParameters: NonNullable; + userMetadata: NonNullable; externalVideo: ExternalVideo; genericMainContent: GenericContentMainArea; navBar: NavBar; diff --git a/docs/docs/administration/customize.md b/docs/docs/administration/customize.md index 1117893dd5..e3017633e6 100644 --- a/docs/docs/administration/customize.md +++ b/docs/docs/administration/customize.md @@ -1375,14 +1375,14 @@ These configs can be set in `/etc/bigbluebutton/bbb-web.properties` - _`overwritable`_: Config will be overwritten if the param is present in the API `/create` request -### Passing custom parameters to the client on join +### Passing user metadata to the client on join The HTML5 client supports a list of parameters that can be added to the `join` API call which modify the look and default behaviour of the client. This list is accurate as of BigBlueButton version 2.2.17 (build 937). These parameters override the global defaults set in `settings.yml`. As the parameters are passed on call to join, it allows for some powerful customization that can vary depending on which user is joining the session. Useful tools for development: - A tool like (https://meyerweb.com/eric/tools/dencoder/) is useful in the encoding-decoding process for the fields expecting encoded value passed (see below). -- The [API mate](https://mconf.github.io/api-mate/) allows you to directly experiment with these custom parameters. To use the API mate, run the following command on your BigBlueButton machine: `sudo bbb-conf --secret`. This creates a link for you with your secret as a parameter so you can get started experimenting right away. +- The [API mate](https://mconf.github.io/api-mate/) allows you to directly experiment with these user metadata. To use the API mate, run the following command on your BigBlueButton machine: `sudo bbb-conf --secret`. This creates a link for you with your secret as a parameter so you can get started experimenting right away. #### Application parameters diff --git a/docs/docs/development/api.md b/docs/docs/development/api.md index 436a312f34..c496c57f78 100644 --- a/docs/docs/development/api.md +++ b/docs/docs/development/api.md @@ -550,7 +550,7 @@ There is a XML response for this call only when the `redirect` parameter is set ``` -See [Passing custom parameters to the client on join](/administration/customize/#passing-custom-parameters-to-the-client-on-join) for additional `join` parameters that can override default settings for the user. +See [Passing user metadata to the client on join](/administration/customize/#passing-user-metadata-to-the-client-on-join) for additional `join` parameters that can override default settings for the user. ### `POST` insertDocument @@ -1264,7 +1264,7 @@ See the following [bigbluebutton-api-ruby](https://github.com/mconf/bigbluebutto To help you create/test valid API calls against your BigBlueButton server, use the excellent [API Mate](http://mconf.github.io/api-mate/) to interactively create API calls. API Mate generates the checksums within the browser (no server component needed) so you can use it to test API calls against a local BigBlueButton server. -If you're developing new API calls or adding parameters on API calls, you can still use the API Mate to test them. Just scroll the page down or type "custom" in the parameter filter and you'll see the inputs where you can add custom API calls or custom parameters. New API calls will appear in the list of API links and new parameters will be added to all the API links. +If you're developing new API calls or adding parameters on API calls, you can still use the API Mate to test them. Just scroll the page down or type "custom" in the parameter filter and you'll see the inputs where you can add custom API calls or user metadata. New API calls will appear in the list of API links and new parameters will be added to all the API links. If your using API Mate to test recordings and want to query by `meetingID`, be sure to clear the `recordID` field first. BigBlueButton's API supports querying for recordings by either value, but not both at the same time. diff --git a/docs/docs/testing/release-testing.md b/docs/docs/testing/release-testing.md index efdd108c9b..1e0e128d2b 100644 --- a/docs/docs/testing/release-testing.md +++ b/docs/docs/testing/release-testing.md @@ -1717,7 +1717,7 @@ Note : ## Custom Parameters [(Automated)](https://github.com/bigbluebutton/bigbluebutton/blob/v2.6.x-release/bigbluebutton-tests/playwright/customparameters/customparameters.spec.js) -Client should apply custom parameters according to the descriptions from [here](/administration/customize#application-parameters). +Client should apply user metadata according to the descriptions from [here](/administration/customize#application-parameters). ## iFrame