Builtin Prosody: adding the prosody-room-type settings to allow rooms to be per channel or per video. WIP.

This commit is contained in:
John Livingston
2021-08-05 15:41:49 +02:00
parent 5237c20332
commit 5c0b274f39
9 changed files with 203 additions and 70 deletions

View File

@ -69,6 +69,7 @@ interface ProsodyConfig {
host: string
port: string
baseApiUrl: string
roomType: 'video' | 'channel'
}
async function getProsodyConfig (options: RegisterServerOptions): Promise<ProsodyConfig> {
const logger = options.peertubeHelpers.logger
@ -81,6 +82,7 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
const enableC2s = (await options.settingsManager.getSetting('prosody-c2s') as boolean) || false
const prosodyDomain = await getProsodyDomain(options)
const paths = await getProsodyFilePaths(options)
const roomType = (await options.settingsManager.getSetting('prosody-room-type')) === 'channel' ? 'channel' : 'video'
const apikey = await getAPIKey(options)
let baseApiUrl = await options.settingsManager.getSetting('prosody-peertube-uri') as string
@ -139,7 +141,8 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
paths,
port,
baseApiUrl,
host: prosodyDomain
host: prosodyDomain,
roomType
}
}