Search code examples
xmppejabberd

xmpp ejabberd - query for user presence


Is there a way to query for user presence in XMPP, given that the user's subscription type is 'both'?

Since i am building for mobile platform, i have blocked all incoming presence stanzas using privacy list. In my use case, a user would be at least be subscribed to 500 users and processing these many presence stanzas would put a lot of stress on the mobile device.

So instead of processing all the user stanzas, i would like to get the presence for a user only when i query for it.


Solution

  • There is no such feature at the moment inside ejabberd, but that's definitely something you can develop as a plugin. You can write a plugin that will be handling http requests using HTTP webserver and do whatever processing and security check you want before answering with the user presence.