Meetings V2 Prosody Plugins and Custom Code Sections - intulse/jitsi-meet GitHub Wiki

Prosody Plugins

After updating any of the plugins restart the Jitsi services

sudo systemctl restart prosody.service jicofo.service jitsi-videobridge2.service

Using Token affiliation by Emrahcom

https://github.com/jitsi-contrib/prosody-plugins/tree/main/token_affiliation

Disable auto-ownership on Jicofo and let the module set the affiliations according to the token content.

hocon -f /etc/jitsi/jicofo/jicofo.conf \ set jicofo.conference.enable-auto-owner false 

add prosody plugin into "/usr/share/jitsi-meet/prosody-plugins"

cd /usr/share/jitsi-meet/prosody-plugins 
wget -O mod_token_affiliation.lua https://raw.githubusercontent.com/jitsi-contrib/prosody-plugins/main/token_affiliation/mod_token_affiliation.lua

Then open the prosody configuration file

sudo vim /etc/prosody/conf.d/meet.{domain}.cfg.lua

Find Component that points to "conference.meet.{domain}.com"

  • add "token_affiliation" to the modules_enabled object
  • add "token_verification" to the modules_enabled object

Find VirtualHost that points to "{jitsi-domain}"

  • add "muc_lobby_rooms" to the modules_enabled object

Using Intulse Plugins

Make sure the plugins are in the Prosody plugins folder:

  • These files are available in the Intulse fork of Jitsi Meet "jitsi-meet/resources/prosody-plugins". The deploy script should copy these files into the "/usr/share/jitsi-meet/prosody-plugins". If the reference fails, use these scripts to add them to the correct folder.
cp ~/jitsi-meet/resources/prosody-plugins/mod_intulse_owner_join.lua /usr/share/jitsi-meet/prosody-plugins/.
cp ~/jitsi-meet/resources/prosody-plugins/mod_muc_intulse_mem_join.lua /usr/share/jitsi-meet/prosody-plugins/.

These module depends on the persistant_lobby and muc_lobby_rooms open the prosody configuration file

sudo vim /etc/prosody/conf.d/meet.{domain}.cfg.lua

Find VirtualHost that points to "{jitsi-domain}

  • add "persistent_lobby" to the modules_enabled object
  • add "muc_lobby_rooms" to the modules_enabled object

Find Component that points to "conference.{jitsi-domain}.com"

  • add "intulse_owner_join" to the modules_enabled object
  • add "muc_intulse_mem_join" to the modules_enabled object


Custom Code Sections

Bypass Lobby based on JWT

Open mod_muc_lobby_rooms plugin in the prosody-plugins folder

sudo vim /usr/share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua

This section of code was added to line 394 and was contributed by a member of Jitsi community. https://community.jitsi.org/t/lobby-jwt-issue-with-moderator-rejoining-the-meeting/84774/8

"Gkleinereva, post:8, topic:84774"

-- begin gkleinereva addition
        local context_user = event.origin.jitsi_meet_context_user;
        if context_user then
            if context_user["affiliation"] == "owner" then
                whitelistJoin = true;
            elseif context_user["affiliation"] == "moderator" then
                whitelistJoin = true;
            elseif context_user["affiliation"] == "teacher" then
                whitelistJoin = true;
            end
        end
        -- end gkleinereva addition