Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Wire up blocked chat username controller

Gabe Kangas765372e297c1
diff --git a/core/data/config.go b/core/data/config.go
index f1bb7070d9..7feb29cfd8 100644
--- a/core/data/config.go
+++ b/core/data/config.go
@@ -585,5 +585,5 @@ func GetUsernameBlocklist() string {
// SetUsernameBlocklist set the username blocklist as a comma seperated string.
func SetUsernameBlocklist(usernames string) error {
- return _datastore.SetString(serverMetadataTagsKey, usernames)
+ return _datastore.SetString(blockedUsernamesKey, usernames)
}
diff --git a/router/router.go b/router/router.go
index e130522451..e44c08301d 100644
--- a/router/router.go
+++ b/router/router.go
@@ -119,6 +119,9 @@ func Start() error {
// Disable chat
http.HandleFunc("/api/admin/config/chat/disable", middleware.RequireAdminAuth(admin.SetChatDisabled))
+ // Set chat usernames that are not allowed
+ http.HandleFunc("/api/admin/config/chat/disallowedusernames", middleware.RequireAdminAuth(admin.SetUsernameBlocklist))
+
// Set video codec
http.HandleFunc("/api/admin/config/video/codec", middleware.RequireAdminAuth(admin.SetVideoCodec))