Prosody mode only:

Removing old modes (ConverseJS and External URI).
Work in progress.
This commit is contained in:
John Livingston
2022-10-10 18:08:20 +02:00
parent e2ec66bf37
commit 7906ddf625
20 changed files with 98 additions and 572 deletions

View File

@ -2,7 +2,6 @@ import type { RegisterServerOptions } from '@peertube/peertube-types'
import { getProsodyConfig, getProsodyFilePaths, writeProsodyConfig } from './config'
import { startProsodyLogRotate, stopProsodyLogRotate } from './logrotate'
import { changeHttpBindRoute } from '../routers/webchat'
import type { ChatType } from '../../../shared/lib/types'
import * as fs from 'fs'
import * as child_process from 'child_process'
@ -139,17 +138,10 @@ async function testProsodyCorrectlyRunning (options: RegisterServerOptions): Pro
}
async function ensureProsodyRunning (options: RegisterServerOptions): Promise<void> {
const { peertubeHelpers, settingsManager } = options
const { peertubeHelpers } = options
const logger = peertubeHelpers.logger
logger.debug('Calling ensureProsodyRunning')
logger.debug('Checking if prosody should be active')
const setting = await settingsManager.getSetting('chat-type')
if (setting !== ('builtin-prosody' as ChatType)) {
logger.info('Chat type is not set to builtin-prosody, we wont launch it')
return
}
const r = await testProsodyCorrectlyRunning(options)
if (r.ok) {
r.messages.forEach(m => logger.debug(m))