How to capture an event in lobby room that is fired by lib jitsi meet?

Hi, I have done some modifications in lib-jitsi-meet Lobby.js file.

when a new participant joining in a lobby room, I want to add that knocking member to lobby member join screen. Moderator can see all knocking participants, I also want that for lobby users.

this.lobbyRoom.addEventListener(
                XMPPEvents.MUC_MEMBER_JOINED,
                // eslint-disable-next-line max-params
                (from, nick, role, isHiddenDomain, statsID, status, identity, botType, jid) => {
                    // we need to ignore joins on lobby for participants that are already in the main room

                    console.log('In lobby MUC_MEMBER_JOINED event');
                    // we emit the new event on the main room so we can propagate
                    // events to the conference
                    this.lobbyRoom.eventEmitter.emit(
                        XMPPEvents.MUC_LOBBY_MEMBER_JOINED,
                        Strophe.getResourceFromJid(from),
                        nick,
                        identity ? identity.avatar : undefined
                    );
                });

I have added this : this.lobbyRoom.eventEmitter.emit(XMPPEvents.MUC_LOBBY_MEMBER_JOINED) event .
Now, how can I capture this in Jitsi meet frontend and update the knocking participant list for Lobby room user.

And also, is this event emitter alright from lib-jitsi-meet to handle this action?
Thank you for any help.

In general, how to sned events to lobbyroom and handle it in Jitsi meet?

These are internal lib-jitsi-meet events.
The events fired for consumption outside the library are here: https://github.com/jitsi/lib-jitsi-meet/blob/master/JitsiConferenceEvents.js

1 Like

yes, got this on jitsi meet, but this event triggers for only moderators, but not for lobby users, can you tell how to capture events for lobby room user also?

ok, now I have got it. I have to add
membersOnly.on(JitsiConferenceEvents.LOBBY_USER_JOINED, (id, name) => {});
event listener to catch the events
conference.on only catches the events in main room

hi Damencho, Thank you for your help. Now, Need help on security issue.
So, for now I’ve achieved what I wanted to do.


Now, lobby member can see other waiting members in his waiting room.
Will this raise any security concern? I mean as lobby members now can get each other’s presence , so I am not sure is there any unwanted issue/ security fault may occur?

Are you seeing presence for other participants in the lobby room?

yes, I have enabled it from mod_muc_lobby_room.lua file.

actually getting other waiting members presence who are in lobby , not the main room presence

Can you share your prosody config?

here prosody.cfg.lua

This is not your jitsi-meet prosody config, this is the main prosody config. Yours is in conf.d folder.

ok let me share

jitsi-meet.txt (7.4 KB)

it depends on your security requirements - If some events are so confidential that the participant list is not to be known to the public, this could be an issue.

yes , actually for waiting room members we don’t have any extra confidential information. so in general it is okay to use right?

I tested this on meet.jit.si and there is no presence coming for other lobby participants … That doesn’t make sense.

yes, that’s what I am telling.

I have enabled other lobby participant presence from this file. I’ve removed the filter where only moderator can receive presence. so now other lobby member can also receive waiting member’s presence.

-- check is an owner, only owners can receive the presence
 --local room = main_muc_service.get_room_from_jid(jid_bare(node .. '@' .. main_muc_component_config));
   --if not room or room.get_affiliation(room, stanza.attr.to) == 'owner' then
       --return stanza;
      --end

            --return nil;

Well, the only thing is privacy to not see others waiting in the lobby if that is ok for your deployment … there is nothing more than that …

Thank you. got it. let us go through this, If found any unwanted issue or privacy concern I’ll inform here (y).