I’m a programmer (i dont know Java) and I was wondering…
in a chat app I’m developing… in the room menu/list I want to display the number of people in each room beside the room name.
Also, I want to also list the amount of people on the server in total when they start the app up.
Is there any way to achieve this off of OpenFire or get this info in a method that isn’t resource intense and efficient?
I’m really curious and I’m thankful to whoever helps.
We can see on number of user and user info of all user in Openfire server at Admin console. We can also see total online user and user info.
Is you asking about server. May be it will help you.
Are you devloping client for Openfire server ?
you can query all rooms with
<iq id="1" to="conference.example.org" type="get">
. This will return a list of rooms and then you can query the number of online people for each room with
<iq id="2" to="email@example.com" type="get">
To return the number of all users you could search all users with pattern "". This may miss some users (@example.com) but it’s nearly right.
they’ll be limited to standard alphabet characters and numbers during registration so that shouldn’t be a problem… plus now i can get the list of rooms killing another problem that would’ve popped up… thanks a lot I really appreciate it.