Optionally disable chat rate limiter and add optional chat slur/language filter (#3681)
* feat(chat): basic profanity filter. For #3139 * feat(chat): add setting for disabling chat spam protection. Closes #3523 * feat(chat): wire up the new chat slur filter to admin and chat. Closes #3139
This commit is contained in:
@@ -38,6 +38,8 @@ const API_HIDE_VIEWER_COUNT = '/hideviewercount';
|
||||
const API_CHAT_DISABLE = '/chat/disable';
|
||||
const API_CHAT_JOIN_MESSAGES_ENABLED = '/chat/joinmessagesenabled';
|
||||
const API_CHAT_ESTABLISHED_MODE = '/chat/establishedusermode';
|
||||
const API_CHAT_SPAM_PROTECTION_ENABLED = '/chat/spamprotectionenabled';
|
||||
const API_CHAT_SLUR_FILTER_ENABLED = '/chat/slurfilterenabled';
|
||||
const API_DISABLE_SEARCH_INDEXING = '/disablesearchindexing';
|
||||
const API_SOCKET_HOST_OVERRIDE = '/sockethostoverride';
|
||||
const API_VIDEO_SERVING_ENDPOINT = '/videoservingendpoint';
|
||||
@@ -258,6 +260,14 @@ export const FIELD_PROPS_DISABLE_CHAT = {
|
||||
useSubmit: true,
|
||||
};
|
||||
|
||||
export const FIELD_PROPS_ENABLE_SPAM_PROTECTION = {
|
||||
apiPath: API_CHAT_SPAM_PROTECTION_ENABLED,
|
||||
configPath: '',
|
||||
label: 'Spam Protection',
|
||||
tip: 'Limits how quickly messages can be sent to prevent spamming.',
|
||||
useSubmit: true,
|
||||
};
|
||||
|
||||
export const FIELD_PROPS_CHAT_JOIN_MESSAGES_ENABLED = {
|
||||
apiPath: API_CHAT_JOIN_MESSAGES_ENABLED,
|
||||
configPath: '',
|
||||
@@ -266,6 +276,14 @@ export const FIELD_PROPS_CHAT_JOIN_MESSAGES_ENABLED = {
|
||||
useSubmit: true,
|
||||
};
|
||||
|
||||
export const FIELD_PROPS_ENABLE_CHAT_SLUR_FILTER = {
|
||||
apiPath: API_CHAT_SLUR_FILTER_ENABLED,
|
||||
configPath: '',
|
||||
label: 'Chat language filter',
|
||||
tip: 'Filters out messages that contain offensive language.',
|
||||
useSubmit: true,
|
||||
};
|
||||
|
||||
export const CHAT_ESTABLISHED_USER_MODE = {
|
||||
apiPath: API_CHAT_ESTABLISHED_MODE,
|
||||
configPath: '',
|
||||
|
||||
@@ -69,6 +69,8 @@ const initialServerConfigState: ConfigDetails = {
|
||||
forbiddenUsernames: [],
|
||||
suggestedUsernames: [],
|
||||
chatDisabled: false,
|
||||
chatSpamProtectionEnabled: true,
|
||||
chatSlurFilterEnabled: false,
|
||||
chatJoinMessagesEnabled: true,
|
||||
chatEstablishedUserMode: false,
|
||||
hideViewerCount: false,
|
||||
|
||||
Reference in New Issue
Block a user