Good afternoon and, first of all, thank you for hard and good work on this platform!
I apologize in advance because this might be a quite silly question but I don’t seem to be able to find a solution.
I’ve been trying to use the modules in /usr/share/jitsi-meet/prosody-plugins but those didn’t seem to be working at all. I’ve added some logs to ensure that those were loaded and they’re but, for some reason I’m unable to figure out, hooks doesn’t seem to be called.
I’ve tried to use existing mod_muc_max_occupants.lua but, just to verify that the problem was in hooks, I’ve just written this very basic test script:
-- Simple hooks test
module:log('info', 'Loading hooks test plugin');
module:log("info", "User successfully authenticated");
I have been looking for a similar problem in the topics but seems that nobody had any problem like this.
You need it under the muc component and I’m not sure that event is available on Prosody 0.10, but for sure is available when using 0.11.
You can grep for that string in all folders in /usr/lib/prosody/modules for it and if you see it, it is available
module:hook("muc-occupant-pre-join", function (event)
module:log('info','Occupant pre join');
local room, stanza = event.room, event.stanza;
local user, domain, res = jid.split(event.stanza.attr.from);
log("info", "--------------> user %s domain %s res %s pass %s", tostring(user),tostring(domain),tostring(res),tostring(room:get_password()));
What is the structure of room object ? I want to take the name of the room.
I read in prosody documentation about muc configurations and i see muc_room_default_members_only , I set it to true and when I am trying to join room using authenticated user jitsi ask me to enter password or enter name to join room.
My question is how can I set the members of room.
Now, I am trying to handle muc-occupant-pre-join event to prevent user to join room, how can I kick user out in my prosody module ?
And how can I listen to the event in jitsi meet to redirect the user to another page ?
We use members only logic for lobby, so you should disable lobby if you are doing such modification.
Members can be added from owners of the room: https://xmpp.org/extensions/xep-0045.html
So make a user, make that user an admin as we do for jicofo and that user can join and add members by … sending xmpp messages, there is no UI for such things, probably you can do it through the js console.