<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>Le 25 oct. 08 à 17:58, Marcus Frenkel a écrit :</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>I'm developing a jabber client. I'm testing it's functionality against<br>ejabberd server.<br><br>According to what I understand about Last Activity (XEP-0012), the last<br>activity table on the server should contain results only for the bare<br>JID, there are no separate records for all JID resources.<br><br>When a user logs in I would like to get his last activity status<br>message. As you know, the last activity status is set via the presence<br>packet of type="unavailable" along with the status message, when a user<br>disconnects. I'm unable to get the last activity, the server doesn't<br>returns the last activity of myself, it returns "<error code="405"<br>type="cancel"> instead. The IQ that I send:<br><br><iq from='myself@host/resource' to='myself@jhost' type='get' > <query<br>xmlns='<a href="jabber:iq:last'/">jabber:iq:last'/</a>></iq><br>or<br><iq from='myself@host' to='myself@jhost' type='get' > <query<br>xmlns='<a href="jabber:iq:last'/">jabber:iq:last'/</a>></iq><br><br>What I need is when a user connects from another computer to be able to<br>get his last activity set by his previous connection.</div></blockquote><div><br></div><div><div>Last activity on the server is stored the last time a user disconnected.</div><div><br></div><div>From the XEP introduction:</div><div><span class="Apple-style-span" style="font-family: Times; font-size: 16px; "><span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; line-height: 16px; ">"The canonical usage is to discover when a disconnected user last accessed the server."</span></span></div><div><br></div><div>You thus cannot get the last activity from the server for a user which is still connected.</div><div><br></div><div>For online users, it is a mostly a client feature (when you use the full JID).</div><div><br></div></div></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-- </div><div>Mickaël Rémond</div><div> <a href="http://www.process-one.net/">http://www.process-one.net/</a></div><div><br class="webkit-block-placeholder"></div></div></span></div></div></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>