Prosody pre-iq not hooked for guest domain

Hello,

We have 2 virtual host in our prosody.conf like:

VirtualHost meet.com → For logined users
modules_enabled = {
“service_meet”;
}

VirtualHost guest.meet.com → For unlogined users
modules_enabled = {
“service_meet”;
}

service_meet plugin needs to run on an iq message received from a client. I need to hook on that iq and add some service data in iq. And then route it to jicofo.

I try to hook like
module:hook(“pre-iq/full”, process_pre_iq_full, 1000);

This perfecly runs for logined users. But somehow I can’t get pre-iq for guest domain users.

Any idea?

Thanks in advance

I asked this to Prosody community. And they routed me to prosody telnet console as in this message below. I am writing his message if any other one has similar problem.

`
Hi Esra,

I recommend using https://prosody.im/doc/modules/mod_admin_shell (or
the telnet console if you are using 0.11) to debug events.

Run the command: debug:logevents("[guest.meet.com](http://guest.meet.com/)")

This will enable debug logging (ensure debug logs are enabled!) of all
events fired on that host. It will help you determine if the event you
are expecting is actually being triggered.

If it is being triggered (visible in the logs) but your code is not
running, you can run this command: debug:events("[guest.meet.com](http://guest.meet.com/)",
"pre-iq/full")

This will show you what handlers are currently registered for that
event, and what their priorities are.

Between these two debug commands, it is possible to track down why
things are not working as expected. If you still have problems after
this, post back here with what you found and we can probably identify
what might be going wrong for you.

Good luck!

Regards,
Matthew``
2 Likes