Wire up blocked chat username controller
This commit is contained in:
parent
99d04c8e69
commit
1586d80a32
@ -585,5 +585,5 @@ func GetUsernameBlocklist() string {
|
|||||||
|
|
||||||
// SetUsernameBlocklist set the username blocklist as a comma seperated string.
|
// SetUsernameBlocklist set the username blocklist as a comma seperated string.
|
||||||
func SetUsernameBlocklist(usernames string) error {
|
func SetUsernameBlocklist(usernames string) error {
|
||||||
return _datastore.SetString(serverMetadataTagsKey, usernames)
|
return _datastore.SetString(blockedUsernamesKey, usernames)
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,9 @@ func Start() error {
|
|||||||
// Disable chat
|
// Disable chat
|
||||||
http.HandleFunc("/api/admin/config/chat/disable", middleware.RequireAdminAuth(admin.SetChatDisabled))
|
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
|
// Set video codec
|
||||||
http.HandleFunc("/api/admin/config/video/codec", middleware.RequireAdminAuth(admin.SetVideoCodec))
|
http.HandleFunc("/api/admin/config/video/codec", middleware.RequireAdminAuth(admin.SetVideoCodec))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user