Jitsi Meet Integration - mod_token_affiliation


I’ve been using Rocket Chat along Jitsi Meet and JWT tokens, and everything works mostly fine.
However, we noticed one undesired behavior that goes like this:

  • A meeting is generated in a Rocket Chat room.
  • All members in the room have moderator rights.
  • They decide it’s necessary to call an external guest (not a Rocket Chat user).
  • They share the meeting link available on Jitsi panel with said guest.
  • They leave the meeting, either because they purposely left or because some network error.
  • After all moderators left the room, the guest user becomes a moderator (due to Jicofo’s enable-auto-owner).
  • The guest now has rights to start a recording, allow other guests in the room, among other undesirable things.

To avoid that I’ve enabled the ‘token_affiliation’ plugin on Jitsi. So, when using an external tool to generate the JWT token, all works according to the plan. I just need to pass the “affiliation”: “owner” parameter and it works as intended.

I wanted to know if is there some way to insert that parameter when creating a meeting through Rocket Chat.
The way it is now (mod_token_affiliation enabled), no Rocket Chat user is a moderator of their own meet rooms, so they can’t allow a guest in because that parameter is missing.

I’m aware that there’s currently no official way to set it, but maybe there would be some files in the routines that create that JWT-based URL that I could edit to add the necessary parameter? Could someone with that knowledge point me to it?

mod_token_affiliation: emrah-buster-templates/machines/eb-jitsi/usr/share/jitsi-meet/prosody-plugins/mod_token_affiliation.lua at master · emrahcom/emrah-buster-templates · GitHub