diff --git a/core/data/config.go b/core/data/config.go index f1bb7070d..7feb29cfd 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 e13052245..e44c08301 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))