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,19 +2,21 @@ 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 {
name: string config: {
description: string name: string
// language: string description: string
// persistent: boolean // language: string
public: boolean // persistent: boolean
// members_only: boolean public: boolean
// allow_member_invites: boolean // members_only: boolean
// public_jids: boolean // allow_member_invites: boolean
subject: string // public_jids: boolean
// changesubject: boolean subject: string
// // historylength: number // changesubject: boolean
// moderated: boolean // // historylength: number
// archiving: boolean // moderated: boolean
// archiving: boolean
}
// affiliations: RoomAffiliation[] // affiliations: RoomAffiliation[]
} }
@ -36,10 +38,12 @@ 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 = {
name: video.name, config: {
description: '', name: video.name,
public: false, description: '',
subject: video.name public: false,
subject: video.name
}
} }
res.json(roomDefaults) res.json(roomDefaults)
} catch (error) { } catch (error) {