Skip to content

Commit

Permalink
option to set bbb join host
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 26, 2024
1 parent 4c6a78e commit 919294e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config_sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ client:
# do not make the text longer, not all html tags are supported
# 'b', 'i', 'em', 'strong', 'a'
text: 'Powered by <a href="https://www.plugnmeet.org" target="_blank">plugNmeet</a>'
# set host info so that BBB joining URL can be more accurate when behind LB
bbb_join_host: "http://localhost:3000"
room_default_settings:
max_duration: 0 # Duration in minutes. 0 = no limit
max_participants: 0 # 0 = no limit
Expand Down
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type ClientInfo struct {
PrometheusConf PrometheusConf `yaml:"prometheus"`
ProxyHeader string `yaml:"proxy_header"`
CopyrightConf *CopyrightConf `yaml:"copyright_conf"`
BBBJoinHost *string `yaml:"bbb_join_host"`
}

type WebhookConf struct {
Expand Down
4 changes: 4 additions & 0 deletions pkg/controllers/bbb.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ func HandleBBBJoin(c *fiber.Ctx) error {
}

ul := fmt.Sprintf("%s://%s/?access_token=%s", c.Protocol(), c.Hostname(), token)
if app.Client.BBBJoinHost != nil && *app.Client.BBBJoinHost != "" {
// use host name from config
ul = fmt.Sprintf("%s/?access_token=%s", *app.Client.BBBJoinHost, token)
}
if customDesign != nil && customDesign.String() != "" {
op := protojson.MarshalOptions{
EmitUnpopulated: false,
Expand Down

0 comments on commit 919294e

Please sign in to comment.