I’m using setup with docker images and auth is done via JWT.
Is it possible to change the presence from value when an participant joins? Right now everytime a participant joins the room, the presence from is test1@muc.meet.jitsi/a1d6c4d4 which test1 is the room name and after the slash a random string assigned.
I added the auth_token module under XMPP_MODULES env var in docker compose. The module is loaded without any issues but the pre-jitsi-authentication event is never fired.
module:depends("jitsi_session");
local inspect = require "inspect";
function on_pre_session(session)
local context_user = session.jitsi_meet_context_user
module:log(LOGLEVEL, 'CONTEXT_USER %s', inspect(context_user))
return context_user['id']
end
module:hook('pre-jitsi-authentication', on_pre_session);
You should already have auth token under the main virtual host if using jwt, probably your problem was that you are not loading your module under the main virtual host.
There is option for global modules to listen for hosts and make your module add the event only for the main virtual host.
That is the right place to put your custom module. But auth module is automatically loaded by prosody when you have authentication = "token" there, which I suppose you have.
To listen for the events you need to do it like this: