mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 02:44:31 +08:00
feat: add custom username suggestions pool (#1644)
* ✨ add custom username suggestions pool * 🚸 add minimum of 10 suggested usernames until custom pool is used
This commit is contained in:
@ -17,6 +17,7 @@ import (
|
||||
func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
||||
ffmpeg := utils.ValidatedFfmpegPath(data.GetFfMpegPath())
|
||||
usernameBlocklist := data.GetForbiddenUsernameList()
|
||||
usernameSuggestions := data.GetSuggestedUsernamesList()
|
||||
|
||||
videoQualityVariants := make([]models.StreamOutputVariant, 0)
|
||||
for _, variant := range data.GetStreamOutputVariants() {
|
||||
@ -64,6 +65,7 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
||||
SupportedCodecs: transcoder.GetCodecs(ffmpeg),
|
||||
VideoCodec: data.GetVideoCodec(),
|
||||
ForbiddenUsernames: usernameBlocklist,
|
||||
SuggestedUsernames: usernameSuggestions,
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -89,6 +91,7 @@ type serverConfigAdminResponse struct {
|
||||
SupportedCodecs []string `json:"supportedCodecs"`
|
||||
VideoCodec string `json:"videoCodec"`
|
||||
ForbiddenUsernames []string `json:"forbiddenUsernames"`
|
||||
SuggestedUsernames []string `json:"suggestedUsernames"`
|
||||
}
|
||||
|
||||
type videoSettings struct {
|
||||
|
||||
Reference in New Issue
Block a user