|Perl: the Markov chain saw|
How to get online users with Net::Jabberby shaitand (Initiate)
|on Nov 02, 2012 at 00:03 UTC||Need Help??|
shaitand has asked for the
wisdom of the Perl Monks concerning the following question:
I am using jabber presence to communicate state between systems because it pushes status updates to everyone automatically
Presence only works on systems on your Roster/Contact list.
How does one retrieve a list of all online users from a Jabber server with Net::Jabber? I've tried worming my way through browse functions and disco functions but haven't gotten anything successful enough to even bother giving the code of my attempts so a code example would be greatly appreciated!
UPDATE: I've found that manually creating and sending the request like this:
Gives an error back with the tag 'not-allowed'. This may be because the user I'm connecting with is not an admin. Using admin credentials isn't an option for me. I welcome any input telling me that I'm mistaken! If someone stumbles upon this looking for the solution the above code may well work with an admin account.
I will use an alternative solution to work around the problem. I'm thinking about having a user with the distinct purpose of initial registration. All systems automatically subscribe to this user on first connection and that user messages back with its roster list and then system can subscribe to all those users.
Thank you to all the monks who looked and considered this issue!