Add server setting to disable chat (#61)

* Add server setting to disable chat

* Prettified Code!

Co-authored-by: gabek <gabek@users.noreply.github.com>
This commit is contained in:
Gabe Kangas
2021-03-14 11:39:07 -07:00
committed by GitHub
parent abf9336f3a
commit 8bac350f61
4 changed files with 25 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ export const API_VIDEO_SEGMENTS = '/video/streamlatencylevel';
export const API_VIDEO_VARIANTS = '/video/streamoutputvariants';
export const API_WEB_PORT = '/webserverport';
export const API_YP_SWITCH = '/directoryenabled';
export const API_CHAT_DISABLE = '/chat/disable';
export async function postConfigUpdateToAPI(args: ApiPostArgs) {
const { apiPath, data, onSuccess, onError } = args;
@@ -159,6 +160,14 @@ export const DEFAULT_VARIANT_STATE: VideoVariant = {
name: '',
};
export const FIELD_PROPS_DISABLE_CHAT = {
apiPath: API_CHAT_DISABLE,
configPath: 'chatDisabled',
label: 'Disable chat',
tip: 'Hide the web chat interface.',
useSubmit: true,
};
export const VIDEO_VARIANT_SETTING_DEFAULTS = {
// this one is currently unused
audioBitrate: {

View File

@@ -23,6 +23,7 @@ export const initialServerConfigState: ConfigDetails = {
ffmpegPath: '',
rtmpServerPort: '',
webServerPort: '',
chatDisabled: false,
s3: {
accessKey: '',
acl: '',