How to listen to XMPP/PROSODY events?

Hello,

I’m searching for a way to listen to XMPP / Prosody events with the API or just vanilla javascript…

I’ve seen that with Prosody’n’Jitsi, we have an url like https://conference.domain.com/.
I’ve found this module Community Modules: 39485b9bbdd6 mod_muc_eventsource/mod_muc_eventsource.lua which happen to provide a https://conference.domain.com/eventsource/myRoom url.

And so, I’ve tried to make an event source :slight_smile:

const mySource = new EventSource('myUrl')

I always have net::ERR_CONNECTION_REFUSED

Here is a screenshot of my error log

Do you have any insights?

Thanks.

You need mapping in nginx to pass through the connection to prosody similar to /http-bind and /xmpp-websocket