mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 01:39:37 +02:00
Add ability for admins to refuse remote comments
This commit is contained in:
parent
031b61c466
commit
f5fd593976
12 changed files with 157 additions and 14 deletions
|
@ -1,7 +1,3 @@
|
|||
import bytes from 'bytes'
|
||||
import { IConfig } from 'config'
|
||||
import { createRequire } from 'module'
|
||||
import { dirname, join } from 'path'
|
||||
import {
|
||||
BroadcastMessageLevel,
|
||||
NSFWPolicyType,
|
||||
|
@ -10,10 +6,14 @@ import {
|
|||
VideoRedundancyConfigFilter,
|
||||
VideosRedundancyStrategy
|
||||
} from '@peertube/peertube-models'
|
||||
import { decacheModule } from '@server/helpers/decache.js'
|
||||
import { buildPath, root } from '@peertube/peertube-node-utils'
|
||||
import { parseBytes, parseDurationToMs } from '../helpers/core-utils.js'
|
||||
import { TranscriptionEngineName, WhisperBuiltinModelName } from '@peertube/peertube-transcription'
|
||||
import { decacheModule } from '@server/helpers/decache.js'
|
||||
import bytes from 'bytes'
|
||||
import { IConfig } from 'config'
|
||||
import { createRequire } from 'module'
|
||||
import { dirname, join } from 'path'
|
||||
import { parseBytes, parseDurationToMs } from '../helpers/core-utils.js'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
let config: IConfig = require('config')
|
||||
|
@ -1090,6 +1090,11 @@ const CONFIG = {
|
|||
return config.get<string>('email.subject.prefix')
|
||||
}
|
||||
}
|
||||
},
|
||||
VIDEO_COMMENTS: {
|
||||
get ACCEPT_REMOTE_COMMENTS () {
|
||||
return config.get<boolean>('video_comments.accept_remote_comments')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1125,8 +1130,8 @@ export {
|
|||
CONFIG,
|
||||
getConfigModule,
|
||||
getLocalConfigFilePath,
|
||||
registerConfigChangedHandler,
|
||||
isEmailEnabled
|
||||
isEmailEnabled,
|
||||
registerConfigChangedHandler
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue