Hello,
Le 25 oct. 08 à 17:58, Marcus Frenkel a écrit :
Hi,
I'm developing a jabber client. I'm testing it's functionality against
ejabberd server.
According to what I understand about Last Activity (XEP-0012), the
last
activity table on the server should contain results only for the bare
JID, there are no separate records for all JID resources.
When a user logs in I would like to get his last activity status
message. As you know, the last activity status is set via the presence
packet of type="unavailable" along with the status message, when a
user
disconnects. I'm unable to get the last activity, the server doesn't
returns the last activity of myself, it returns "<error code="405"
type="cancel"> instead. The IQ that I send:
<iq from='[EMAIL PROTECTED]/resource' to='[EMAIL PROTECTED]' type='get' >
<query
xmlns='jabber:iq:last'/></iq>
or
<iq from='[EMAIL PROTECTED]' to='[EMAIL PROTECTED]' type='get' > <query
xmlns='jabber:iq:last'/></iq>
What I need is when a user connects from another computer to be able
to
get his last activity set by his previous connection.
Last activity on the server is stored the last time a user disconnected.
From the XEP introduction:
"The canonical usage is to discover when a disconnected user last
accessed the server."
You thus cannot get the last activity from the server for a user which
is still connected.
For online users, it is a mostly a client feature (when you use the
full JID).
--
Mickaël Rémond
http://www.process-one.net/
_______________________________________________
JDev mailing list
FAQ: http://www.jabber.org/discussion-lists/jdev-faq
Forum: http://www.jabberforum.org/forumdisplay.php?f=20
Info: http://mail.jabber.org/mailman/listinfo/jdev
Unsubscribe: [EMAIL PROTECTED]
_______________________________________________