diff --git a/server/internal/types/config/webrtc.go b/server/internal/types/config/webrtc.go index bf49cff9..d7dcb1b9 100644 --- a/server/internal/types/config/webrtc.go +++ b/server/internal/types/config/webrtc.go @@ -68,8 +68,8 @@ func (WebRTC) Init(cmd *cobra.Command) error { } // TODO: Should be moved to session config. - cmd.PersistentFlags().Bool("implicit-control", false, "if enabled members can gain control implicitly") - if err := viper.BindPFlag("implicit-control", cmd.PersistentFlags().Lookup("implicit-control")); err != nil { + cmd.PersistentFlags().Bool("implicit_control", false, "if enabled members can gain control implicitly") + if err := viper.BindPFlag("implicit_control", cmd.PersistentFlags().Lookup("implicit_control")); err != nil { return err } @@ -130,5 +130,5 @@ func (s *WebRTC) Set() { } // TODO: Should be moved to session config. - s.ImplicitControl = viper.GetBool("implicit-control") + s.ImplicitControl = viper.GetBool("implicit_control") } diff --git a/server/internal/types/websocket.go b/server/internal/types/websocket.go index 9000e9ba..0ea4ee6b 100644 --- a/server/internal/types/websocket.go +++ b/server/internal/types/websocket.go @@ -18,6 +18,7 @@ type Stats struct { LastUserLeftAt *time.Time `json:"last_user_left_at"` ControlProtection bool `json:"control_protection"` + ImplicitControl bool `json:"implicit_control"` } type WebSocket interface { diff --git a/server/internal/websocket/websocket.go b/server/internal/websocket/websocket.go index b4523c82..d5b56de5 100644 --- a/server/internal/websocket/websocket.go +++ b/server/internal/websocket/websocket.go @@ -316,6 +316,7 @@ func (ws *WebSocketHandler) Stats() types.Stats { LastUserLeftAt: ws.lastUserLeftAt, ControlProtection: ws.conf.ControlProtection, + ImplicitControl: ws.handler.webrtc.ImplicitControl(), } }