The script from post #10 is working great on Prosody 0.11.x, but I have a problem with Prosody 0.10.0
The script writes the password to the persistent storage and also reads it from there.
module:hook("muc-occupant-pre-join", function (event)
works with Prosody 0.11.x but seems not to be fired on Prosody 0.10.0
So, jicofo cannot join the room as the first member and we are ending in
Oops, Something went wrong and we couldn’t connect to the conference: connection.GET_SESSION_ID_ERROR.
Anyone who got it working on Prosody 0.10.0 and can tell, which event is fired before jicofo joins a room?
Does the muc-room-pre--create event not even fire or is it the module that fails to work? I did not check, but it seems likely that you would need to add some code again to whitelist jicofo when using the muc-room-pre-create hook (similar to what needed to be done for persistent rooms).
I use it to learn, at wich point in time a specific event is triggered.
With Prosody 0.11.x, I see the output in the prosody.log file . With Prosody 0.10.0 nothing happens.
These are the events that are triggered with Prosody 0.10.0 ( 0.11.x triggers ALL events) when I create a new room and log in as owner
May 16 11:47:54 mod_bosh info New BOSH session, assigned it sid '966c30cf-ae17-495b-acac-9e32645a0d29'
May 16 11:47:54 bosh966c30cf-ae17-495b-acac-9e32645a0d29 info Authenticated as d5a11a8d-9c0a-4e0d-bfd9-5e7c9c81fa72@guest.meet.xyz.net
May 16 11:47:55 conference.meet.xyz.net:log_events info muc-room-created event triggered
May 16 11:48:02 conference.meet.xyz.net:log_events info muc-room-destroyed event triggered
May 16 11:48:03 conference.meet.xyz.net:muc_domain_mapper warn Session filters applied
May 16 11:48:03 mod_bosh info New BOSH session, assigned it sid 'eda84fb7-7732-41f1-8c90-486053fc73db'
May 16 11:48:04 bosheda84fb7-7732-41f1-8c90-486053fc73db info Authenticated as ulrich@meet.xyz.net
May 16 11:48:04 conference.meet.xyz.net:log_events info muc-room-created event triggered
May 16 11:48:04 bosheda84fb7-7732-41f1-8c90-486053fc73db info BOSH client disconnected
May 16 11:48:05 conference.meet.xyz.net:log_events info muc-room-created event triggered
May 16 11:48:12 conference.meet.xyz.net:log_events info muc-room-destroyed event triggered
May 16 11:48:15 conference.meet.xyz.net:log_events info muc-room-created event triggered
Anyone a solution other than “upgrade to Prosody 011.x”? We cannot upgrade, because the upgrade would break LDAP auth with cyrus.
A look into the Prosody 0.10 sourecode, and it becomes pretty clear why the
module:hook("muc-occupant-pre-join"
does not work.
It just doesn’t get triggered anywhere. The same goes for
module:hook("muc-room-pre-create" .
The triggering events are only triggered from Prosody 0.11 on.
The whole thing happens in mod_muc.lua.
Starting with Prosody 0.11 several more libs and modules have been added there.
I have not yet tested if you can simply exchange the mod_muc + dependencies.