Retrieving list rooms from prosody.

This commit is contained in:
John Livingston
2021-06-12 03:52:45 +02:00
parent 00bf5bd96b
commit 30d70e033e
13 changed files with 397 additions and 49 deletions

View File

@ -96,6 +96,8 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
// TODO: add a settings to choose?
config.useDefaultPersistent()
config.useListRoomsApi(apikey)
let logLevel: ProsodyLogLevel | undefined
if (logger.level && (typeof logger.level === 'string')) {
if (logger.level === 'error' || logger.level === 'info' || logger.level === 'debug') {

View File

@ -236,6 +236,11 @@ class ProsodyConfigContent {
this.muc.set('muc_room_default_persistent', true)
}
useListRoomsApi (apikey: string): void {
this.muc.add('modules_enabled', 'http_peertubelivechat_list_rooms')
this.muc.set('peertubelivechat_list_rooms_apikey', apikey)
}
setLog (level: ProsodyLogLevel, syslog?: ProsodyLogLevel[]): void {
let log = ''
log += 'log = {\n'