(Once again) Autostart Lobby

Is it not possible (on own server) after login as Host to autostart the lobby function ?

No, it’s not currently possible.

Any chance for in the future?

Bart Helderman

You can patch the mod_muc_lobby_rooms.lua Prosody module, with something like:

--- a/mod_muc_lobby_rooms.lua	2022-01-25 22:30:49.920697784 +0700
+++ b/mod_muc_lobby_rooms.lua	2022-01-25 22:33:04.649841192 +0700
@@ -57,10 +57,13 @@
 
 local whitelist;
 local check_display_name_required;
+local auto_create_lobby;
 local function load_config()
     whitelist = module:get_option_set('muc_lobby_whitelist', {});
     check_display_name_required
         = module:get_option_boolean('muc_lobby_check_display_name_required', true);
+    auto_create_lobby
+        = module:get_option_boolean('muc_lobby_auto_create_lobby', false);
 end
 load_config();
 
@@ -412,6 +415,15 @@
             end
         end
     end);
+
+    if auto_create_lobby then
+        host_module:hook('muc-set-affiliation', function(event)
+            if jid_split(event.jid) ~= 'focus' and event.affiliation == 'owner' then
+                module:log('info', 'Automatically creating lobby room (muc_lobby_auto_create_lobby=true)');
+                handle_create_lobby(event);
+            end
+        end);
+    end
 end);
 
 function handle_create_lobby(event)

You can just this call at the right moment !

conference.enableLobby();

So within conference.js it will be like this (just one way of doing it):

[...]
        room.on(JitsiConferenceEvents.USER_ROLE_CHANGED, (id, role) => {
            if (this.isLocalId(id)) {
                logger.info(`My role changed, new role: ${role}`);
                APP.store.dispatch(localParticipantRoleChanged(role));
                if (this.isModerator !== room.isModerator()) {
                    this.isModerator = room.isModerator();
                    if(this.isModerator){
                        if(config.startWithLobbyMode){
                            var conference = getCurrentConference(APP.store.getState()); 
                            conference.enableLobby();
                        }
                    }
                }
                APP.API.notifyUserRoleChanged(id, role);
[...]

dont forget to import getCurrentConference from ./react/features/base/conference and declare startWithLobbyMode (value that controles automatically enabling Lobby mode) in config.js

Auto-lobby is a bit problematic because we have no good answer to how to get back to a meeting if you are the only moderator and left with the lobby on.

Also, if there are many users waiting for the owner to join, they’d be let in before the lobby can be enabled.

These need a solution before we can think of a way to auto-enable the lobby.

Thanks, hoping it wil be resolved soon.

Bart Helderman

Just to adjust your expectations: nobody is working on any of those items, AFAIK.

Ok, thanks for the input, pity :woozy_face:

Met vriendelijke groet,
Bart Helderman

We’re using the patch above (optional auto-lobby) in combination with another patch that optionally bypasses the lobby for anyone with the moderator role, to solve the getting back in problem. We don’t enable these by default though, because it’s not appropriate in all situations. I think a general solution to be merged into jitsi-meet would have to take another approach.

Yeah our main problem here is the fact that meet.jit.si uses the allowners module, so everyone is a moderator.

Maybe some compromise can be reached that this only works with tokens or something.

Using above patch and it works great, just what we wanted.
And of course is on our own server.
I’d would like to see it as a option with a (compulsary) added watchword.