Prosody pre-iq not hooked for guest domain

34 views
Skip to first unread message

Esra Hatice Yılmaz

unread,
Sep 22, 2022, 9:30:33 AM9/22/22
to Prosody IM Users

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. 

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

Matthew Wild

unread,
Sep 22, 2022, 10:52:44 AM9/22/22
to Prosody IM Users Group
Hi Esra,

On Thu, 22 Sept 2022 at 14:30, Esra Hatice Yılmaz
<yilmazes...@gmail.com> wrote:
> This perfecly runs for logined users. But somehow I can’t get pre-iq for guest domain users.

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")

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",
"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

Esra Hatice Yılmaz

unread,
Sep 23, 2022, 7:45:21 AM9/23/22
to Prosody IM Users
Thank you Matthew.

Telnet console rocks :) I haven't used it earlier. 

It is obvious that service_meet is not loaded for "guest.meet.com". Because, It is not listed when I run debug:events("guest.meet.com", "pre-iq/full") 
And it is listed when I run debug:events("meet.com", "pre-iq/full") 

Is there any other place that I have to add for configuration? I only added it under  Virtual Hosts's modules_enabled = {} configuration.

Thank you,
Esra


22 Eylül 2022 Perşembe tarihinde saat 17:52:44 UTC+3 itibarıyla mwi...@gmail.com şunları yazdı:
Reply all
Reply to author
Forward
0 new messages