Send message in lobby room

Hi everyone,
I realized that jitsi uses the ChatRoom class to create a lobby room. Since it is having the same class like the main room, I am trying to use the sendMessage api on the lobby room instance to send messages to participants in the lobby room but the messages doesn’t get broadcasted to their end. Is there something I am doing wrong? Below is a code snippet of what I did to access the lobby room and send a message.

state['features/base/conference']'My message', 'body') // the moderator to other members in the lobby room

state['features/base/conference']'attendee message', 'body') // the attendee to the lobby room

FYI this is worked on. Result is supposed to be merged back into public version but unfortunately working version is not published so you can’t take inspiration (or maybe help ?)

1 Like

Is there a reason why it doesn’t work

no definite idea, sorry. Maybe it’s because there is no Javascript code to grab them and display them on screen ?

I tried to add an event listener to the lobby room to receive any kind of information while debugging. But I couldn’t get the messages. This is how I added the event listener['features/base/conference']'xmpp.message_received', console.log) // for the attendee['features/base/conference']'xmpp.message_received', console.log) // for the moderator 

Beyond the most generic basic advice, that is, you should take a look at the browser console to see if there are any error messages when you send your message, then if there are none, go to the Prosody server, enable logging debug and look at the message to see if Prosody server complains, if yes take action by looking at the room properties and/or authorizations, and if no take a look at the receiver browser console, I can’t be of more help, sorry.