Rewriting some c2s code.

This commit is contained in:
John Livingston
2021-07-14 18:46:08 +02:00
parent fbf9ef3eac
commit ed718d7d27
2 changed files with 15 additions and 11 deletions

View File

@ -168,14 +168,10 @@ class ProsodyConfigContent {
this.authenticated.set('http_auth_url', url)
}
usePeertubeBosh (prosodyDomain: string, port: string, enableC2s: boolean, c2sPort: string): void {
usePeertubeBosh (prosodyDomain: string, port: string): void {
this.global.set('c2s_require_encryption', false)
this.global.set('interfaces', ['127.0.0.1', '::1'])
if (enableC2s) {
this.global.set('c2s_ports', [c2sPort])
} else {
this.global.set('c2s_ports', [])
}
this.global.set('c2s_ports', [])
this.global.set('c2s_interfaces', ['127.0.0.1', '::1'])
this.global.set('s2s_ports', [])
this.global.set('s2s_interfaces', ['127.0.0.1', '::1'])
@ -205,6 +201,10 @@ class ProsodyConfigContent {
}
}
useC2S (c2sPort: string): void {
this.global.set('c2s_ports', [c2sPort])
}
useMucHttpDefault (url: string): void {
this.muc.add('modules_enabled', 'muc_http_defaults')
this.muc.add('muc_create_api_url', url)