diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/license.go | 6 | ||||
-rw-r--r-- | model/webrtc.go | 21 |
2 files changed, 21 insertions, 6 deletions
diff --git a/model/license.go b/model/license.go index ed38ea438..8d8d0068f 100644 --- a/model/license.go +++ b/model/license.go @@ -44,7 +44,6 @@ type Features struct { SAML *bool `json:"saml"` PasswordRequirements *bool `json:"password_requirements"` // after we enabled more features for webrtc we'll need to control them with this - Webrtc *bool `json:"webrtc"` FutureFeatures *bool `json:"future_features"` } @@ -124,11 +123,6 @@ func (f *Features) SetDefaults() { f.PasswordRequirements = new(bool) *f.PasswordRequirements = *f.FutureFeatures } - - if f.Webrtc == nil { - f.Webrtc = new(bool) - *f.Webrtc = *f.FutureFeatures - } } func (l *License) IsExpired() bool { diff --git a/model/webrtc.go b/model/webrtc.go new file mode 100644 index 000000000..e746d62a8 --- /dev/null +++ b/model/webrtc.go @@ -0,0 +1,21 @@ +package model + +import ( + "encoding/json" + "io" +) + +type GatewayResponse struct { + Status string `json:"janus"` +} + +func GatewayResponseFromJson(data io.Reader) *GatewayResponse { + decoder := json.NewDecoder(data) + var o GatewayResponse + err := decoder.Decode(&o) + if err == nil { + return &o + } else { + return nil + } +} |