processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6k stars 1.5k forks source link

Error While call /api/get_user_subscriptions at localhost #4197

Closed vietnguyen87 closed 2 months ago

vietnguyen87 commented 2 months ago

I can call many admin api others like /api/get_roster /api/create_room_with_opts /api/get_subscribers ...

But i get a error when call /api/get_user_subscriptions with params: { "user":"user1", "host":"localhost" }

return error: Unknown host passed in 'user'

ejabberd.yml modules: mod_muc: default_room_options: allow_subscription: true

What am I missing? Please help. Thanks.!

prefiks commented 2 months ago

I recently expanded validation of api fields, and looks like i used wrong validator for that command fields (it check if this is valid room name, instead of valid user name), let me fix this.

prefiks commented 2 months ago

This should be fixed by commit 61ad808d26987a14dac9679bb76e3c896c38ce7f

vietnguyen87 commented 2 months ago

thanks @prefiks.!