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