From 643fc7e2a239397bdbfce289a4fe108770e28d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 26 Mar 2024 07:18:34 -0500 Subject: [PATCH] feat(visitors): Updates docs for promotion. (#14538) * feat(visitors): Updates docs for promotion. * squash: Update config.js comment --- config.js | 4 ++++ doc/debian/jitsi-meet/jitsi-meet.example | 9 +++++++++ resources/extra-large-conference/README.md | 7 +++++++ resources/prosody-plugins/mod_visitors_component.lua | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index e2eb12a3ae..6cc6723701 100644 --- a/config.js +++ b/config.js @@ -59,6 +59,10 @@ var config = { // https://github.com/jitsi/jitsi-meet/issues/7376 // focusUserJid: 'focus@auth.jitsi-meet.example.com', + // Option to send conference requests to jicofo over http (requires nginx rule for it) + // conferenceRequestUrl: + // 'https:///' + subdir + 'conference-request/v1', + // Options related to the bridge (colibri) data channel bridgeChannel: { // If the backend advertises multiple colibri websockets, this options allows diff --git a/doc/debian/jitsi-meet/jitsi-meet.example b/doc/debian/jitsi-meet/jitsi-meet.example index 44ea6c9663..5b96ec90bb 100644 --- a/doc/debian/jitsi-meet/jitsi-meet.example +++ b/doc/debian/jitsi-meet/jitsi-meet.example @@ -150,6 +150,15 @@ server { # alias /usr/share/jitsi-meet/load-test/libs/$1; #} + location ~ ^/conference-request/v1(\/.*)?$ { + proxy_pass http://127.0.0.1:8888/conference-request/v1$1; + add_header "Cache-Control" "no-cache, no-store"; + add_header 'Access-Control-Allow-Origin' '*'; + } + location ~ ^/([^/?&:'"]+)/conference-request/v1(\/.*)?$ { + rewrite ^/([^/?&:'"]+)/conference-request/v1(\/.*)?$ /conference-request/v1$2; + } + location ~ ^/([^/?&:'"]+)$ { set $roomname "$1"; try_files $uri @root_path; diff --git a/resources/extra-large-conference/README.md b/resources/extra-large-conference/README.md index 246f84920d..8114773bac 100644 --- a/resources/extra-large-conference/README.md +++ b/resources/extra-large-conference/README.md @@ -83,6 +83,7 @@ s2s_whitelist = { - Create the visitors component in /etc/prosody/conf.d/jitmeet.example.com.cfg.lua: ``` Component "visitors.jitmeet.example.com" "visitors_component" + auto_allow_visitor_promotion = true ``` - Make sure you add the correct upstreams to nginx config ``` @@ -113,3 +114,9 @@ service nginx restart Now after the main 30 participants join, the rest will be visitors using the visitor nodes. + +To enable promotion where visitors need to be approved by a moderator to join the meeting: + - you need to switch `auto_allow_visitor_promotion=false`. + - You need to enable http requests to jicofo by editing config.js and adding a nginx rule for it. + - In /etc/jitsi/meet/jitmeet.example.com-config.js uncomment conferenceRequestUrl. + - In jitsi-meet nginx config make sure you have the conference-request location rules. diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.lua index 2931989178..85a08c600a 100644 --- a/resources/prosody-plugins/mod_visitors_component.lua +++ b/resources/prosody-plugins/mod_visitors_component.lua @@ -334,7 +334,7 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul -- allow join return; end - + module:log('error', 'Visitor needs to be allowed by a moderator %s', stanza.attr.from); origin.send(st.error_reply(stanza, 'cancel', 'not-allowed', 'Visitor needs to be allowed by a moderator')); return true; end