[ejabberd] getting last activity of a user from ejabberd server

Badlop badlop at gmail.com
Mon Jan 11 01:30:35 MSK 2010


2010/1/10 Tharindu Madushanka <tharindufit at gmail.com>:
> Is there a way how I could get this online status.. for jabber users when
> they are not my contacts..

For that case, you can't use XEP-0012, see two quotes from it:
http://xmpp.org/extensions/xep-0012.html

If the requesting entity is not authorized to view the user's presence
information (normally via a presence subscription as defined in
XMPP-IM), the user's server MUST NOT return last activity information
but instead MUST return a <forbidden/> error in response to the last
activity request.

In particular, as with the offline query use case above, if the
requesting entity is not authorized to view the user's presence
information (normally via a presence subscription as defined in XMPP
IM), the user's server MUST NOT deliver the IQ-get to an available
resource but instead MUST return a <forbidden/> error in response to
the last activity request.


> I would like to know some method to get the
> online status of jabber users in my server..

$ ejabberdctl user_resources badlop localhost
workg
$ ejabberdctl user_resources user123 localhost
$


> and their last logged out
> time.. using last activity may be.. can I do this with ejabberd server..


---


More information about the ejabberd mailing list