Fix room config result.

This commit is contained in:
John Livingston 2021-05-01 10:22:06 +02:00
parent a25ef24237
commit fefcf1f08a

View File

@ -2,6 +2,7 @@ import type { Router, Request, Response, NextFunction } from 'express'
// See here for description: https://modules.prosody.im/mod_muc_http_defaults.html
interface RoomDefaults {
config: {
name: string
description: string
// language: string
@ -15,6 +16,7 @@ interface RoomDefaults {
// // historylength: number
// moderated: boolean
// archiving: boolean
}
// affiliations: RoomAffiliation[]
}
@ -36,11 +38,13 @@ async function initApiRouter (options: RegisterServerOptions): Promise<Router> {
// TODO: check if room is legit and fill informations
const roomDefaults: RoomDefaults = {
config: {
name: video.name,
description: '',
public: false,
subject: video.name
}
}
res.json(roomDefaults)
} catch (error) {
next(error)