Diagnostic tool: testing API communication between Peertube and Prosody.
This commit is contained in:
@ -96,6 +96,8 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
|
||||
// TODO: add a settings to choose?
|
||||
config.useDefaultPersistent()
|
||||
|
||||
config.useTestModule(apikey)
|
||||
|
||||
let logLevel: ProsodyLogLevel | undefined
|
||||
if (logger.level && (typeof logger.level === 'string')) {
|
||||
if (logger.level === 'error' || logger.level === 'info' || logger.level === 'debug') {
|
||||
|
@ -236,6 +236,11 @@ class ProsodyConfigContent {
|
||||
this.muc.set('muc_room_default_persistent', true)
|
||||
}
|
||||
|
||||
useTestModule (apikey: string): void {
|
||||
this.global.add('modules_enabled', 'http_peertubelivechat_test')
|
||||
this.global.set('peertubelivechat_test_apikey', apikey)
|
||||
}
|
||||
|
||||
setLog (level: ProsodyLogLevel, syslog?: ProsodyLogLevel[]): void {
|
||||
let log = ''
|
||||
log += 'log = {\n'
|
||||
|
Reference in New Issue
Block a user