Skip to content

Commit

Permalink
for bbb auto gen user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 26, 2024
1 parent d1de69e commit 6b1b31f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions bbbapiwrapper/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func ConvertCreateRequest(r *CreateMeetingReq, rawQueries map[string]string) (*p
AllowScreenShare: true,
AllowRaiseHand: &b,
AllowVirtualBg: &b,
AutoGenUserId: &b,
RecordingFeatures: &plugnmeet.RecordingFeatures{
IsAllow: r.Record,
IsAllowCloud: r.Record,
Expand Down Expand Up @@ -240,19 +241,15 @@ func setLockSettings(f *plugnmeet.LockSettings, r *CreateMeetingReq) {
if r.LockSettingsDisableCam {
f.LockWebcam = &l
}

if r.LockSettingsDisableMic {
f.LockMicrophone = &l
}

if r.LockSettingsDisablePublicChat {
f.LockChatSendMessage = &l
}

if r.LockSettingsDisablePrivateChat {
f.LockPrivateChat = &l
}

if r.LockSettingsDisableNotes {
f.LockSharedNotepad = &l
}
Expand Down
2 changes: 1 addition & 1 deletion bbbapiwrapper/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ func ConvertJoinRequest(r *JoinMeetingReq, isAdmin bool) *plugnmeet.GenerateToke
RoomId: CheckMeetingIdToMatchFormat(r.MeetingID),
UserInfo: &plugnmeet.UserInfo{
Name: r.FullName,
UserId: CheckForUserId(r.UserID),
IsAdmin: isAdmin,
UserMetadata: &plugnmeet.UserMetadata{
LockSettings: &plugnmeet.LockSettings{},
ExUserId: &r.UserID,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion proto_files/plugnmeet_create_room.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "plugnmeet_auth_room.proto";
message CreateRoomReq {
string room_id = 1 [(buf.validate.field).cel = {
id: "room_id_format",
message: "room_id should only contain letters, digits or -_",
message: "room_id should only contain ASCII letters (a-z A-Z), digits (0-9) or -_",
expression: "this.matches('^[a-zA-Z0-9-_]+$')"
}];
optional uint32 empty_timeout = 2 [(buf.validate.field).uint32.gt = 0];
Expand Down
2 changes: 1 addition & 1 deletion proto_files/plugnmeet_gen_token.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "buf/validate/validate.proto";
message GenerateTokenReq {
string room_id = 1 [(buf.validate.field).cel = {
id: "room_id_format",
message: "room_id should only contain letters, digits -_",
message: "room_id should only contain letters (a-z A-Z), digits (0-9) or -_",
expression: "this.matches('^[a-zA-Z0-9-_]+$')"
}];
UserInfo user_info = 2 [(buf.validate.field).required = true];
Expand Down

0 comments on commit 6b1b31f

Please sign in to comment.