When the moderator uses JWT and setups lobby room, I see a bug where Moderator is also taken to prejoin screen to request 'Ask to join".
Here is the sequence of events:
Moderator joins a room with JWT token
Moderator turns on Lobby
Guest joins the room. Requests for “to be joined” into the meeting.
Moderator allows the guest to join the room
Now the moderator hangs up the call.
However, the guest is still in the room
Moderator tries to join the call with the same JWT token used earlier.
He’s taken to a prejoin screen where now he has to request “Ask to join”. This seems to be a bug!!!
step 8 doesn’t happen if the guest had also vacated the meeting room before the moderator tried to rejoin. If there was no one already in the room only then moderator with JWT is logged into the room.
This is how lobby works, with or without jwt. The workaround for this is the moderator to set a password to the room, so he can bypass lobby with it when needed.
However, is there anyway I can override existing behaviour - meaning, if I see a user with jwt token for the room when lobby is enabled, take him directly into the room ?
Basically I want to bypass the prejoin screen as soon as I see jwt token.
You need changes in jitsi-meet, which can just check whether jwt is been decoded correctly and cannot validate the token.
You will skip pre-join using jwt then you need to bypass lobby you can modify it here add one more rule after the whitelisting:
You can do it by checking session.auth_token is it not nil …
@damencho, spot on. My deployment was using the plugins from /usr/share/jitsi-meet. So, I pointed the prosody to my local deployment, restarted prosody, jicofo and jvb. Host with JWT was able to rejoin the meeting bypassing the pre-join screen.
Vinay’s solution will let anyone with a valid JWT bypass the lobby, regardless of their moderation status. We’re using the token_affiliation prosody plugin to determine moderation status, so I adapted Vinay’s code to let moderators bypass the lobby, but send non-moderators to the lobby. Here’s the code if it would help anyone else.
-- whitelist participants
if whitelist:contains(invitee_domain) or whitelist:contains(invitee_bare_jid) then
whitelistJoin = true;
end
-- 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
local password = join:get_child_text('password', MUC_NS);
if password and room:get_password() and password == room:get_password() then
whitelistJoin = true;
end