From bec928c3aa6c512fde98ad3d746963107c8f8e3c Mon Sep 17 00:00:00 2001 From: ChrisPortman Date: Thu, 13 Aug 2020 19:17:16 +1000 Subject: [PATCH] prosody: configure lobby on the guest domain is necessary If the lobby is enabled and ENABLE_AUTH and ENABLE_GUESTS is true, and therefore the guest.$XMPP_DOMAIN domain is to be defined, the lobby config should be placed in the guest domain. --- .../rootfs/defaults/conf.d/jitsi-meet.cfg.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua index 6d584cc..9813226 100644 --- a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua @@ -7,6 +7,7 @@ plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" } http_default_host = "{{ .Env.XMPP_DOMAIN }}" {{ $ENABLE_AUTH := .Env.ENABLE_AUTH | default "0" | toBool }} +{{ $ENABLE_GUEST_DOMAIN := and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool)}} {{ $AUTH_TYPE := .Env.AUTH_TYPE | default "internal" }} {{ $JWT_ASAP_KEYSERVER := .Env.JWT_ASAP_KEYSERVER | default "" }} {{ $JWT_ALLOW_EMPTY := .Env.JWT_ALLOW_EMPTY | default "0" | toBool }} @@ -53,7 +54,7 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}" "ping"; "speakerstats"; "conference_duration"; - {{ if $ENABLE_LOBBY }} + {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }} "muc_lobby_rooms"; {{ end }} {{ if .Env.XMPP_MODULES }} @@ -64,7 +65,7 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}" {{end}} } - {{ if $ENABLE_LOBBY }} + {{ if and $ENABLE_LOBBY (not $ENABLE_GUEST_DOMAIN) }} main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}" lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}" {{ end }} @@ -74,10 +75,20 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}" c2s_require_encryption = false -{{ if and $ENABLE_AUTH (.Env.ENABLE_GUESTS | default "0" | toBool) }} +{{ if $ENABLE_GUEST_DOMAIN }} VirtualHost "{{ .Env.XMPP_GUEST_DOMAIN }}" authentication = "anonymous" c2s_require_encryption = false + + {{ if $ENABLE_LOBBY }} + modules_enabled = { + "muc_lobby_rooms"; + } + + main_muc = "{{ .Env.XMPP_MUC_DOMAIN }}" + lobby_muc = "lobby.{{ .Env.XMPP_DOMAIN }}" + {{ end }} + {{ end }} VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"