I'm writing an implementation very close to Google Talk's shared status extension (
So my question is: what is the best method to implement this kind of functionality? The only reason I need to get the users presence is to access the "show" value since the whole point of this extension is to change the status I already have the status I want to send out. I can't just get show from one of the resources and use it for all since each resource can have its own show value.
tldr: How can you get the current presence of a user when that user is the one requesting the information since you can't use get_presence() since they're the same process.
Thanks
As example code, download
As example code, download from ejabberd-modules SVN the file mod_admin_extra.erl and search for the function user_sessions_info(User, Host).