chore(go): move stream keys to use generated type. For #3778

This commit is contained in:
Gabe Kangas
2025-01-18 16:38:59 -08:00
parent b3947ef7ea
commit e78d62ce63
8 changed files with 29 additions and 32 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/owncast/owncast/config"
"github.com/owncast/owncast/models"
"github.com/owncast/owncast/persistence/configrepository"
"github.com/owncast/owncast/webserver/handlers/generated"
)
var _hasInboundRTMPConnection = false
@@ -87,11 +88,11 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
// If a stream key override was specified then use that instead.
if config.TemporaryStreamKey != "" {
validStreamingKeys = []models.StreamKey{{Key: config.TemporaryStreamKey}}
validStreamingKeys = []generated.StreamKey{{Key: &config.TemporaryStreamKey}}
}
for _, key := range validStreamingKeys {
if secretMatch(key.Key, c.URL.Path) {
if key.Key != nil && secretMatch(*key.Key, c.URL.Path) {
accessGranted = true
break
}