[Standards] XEP-0256 (Last Activity in Presence) questions/issues
nwalp at pidgin.im
Mon Oct 15 18:16:27 UTC 2012
I apologize that I didn't bring this up several years ago when this XEP
first popped up, but I was on a (long) hiatus from my open source work,
and really wasn't following anything in XMPP-land.
I've been reviewing the XMPP code in libpurple (basis of Pidgin, Finch,
and Adium), and was looking into some issues with the XEP-0256
handling. There are 2 separate issues that I feel need addressing.
Apologies if this has been discussed on here before, I couldn't find
anything in the archives.
First, the spec (much like XEP-0012 which it derives from) tries to
serve multiple purposes, serving as a mechanism for both "idle time" and
time since last login. From XEP-0012:
> 7. Implementation Notes
> The information contained in an IQ reply for this namespace is
> inherently ambiguous. Specifically, for a bare JID
> <localpart at domain.tld> the information is the time since the JID was
> last connected to its server; for a full JID
> <localpart at domain.tld/resource> the information is the time since the
> resource was last active in the context of an existing session; and
> for a bare domain the information is the uptime for the server or
> component. An application MUST take these differences into account
> when presenting the information to a human user (if any).
In XEP-0256, the 2 different pieces of information are how long since
last login (similar to the bare JID case in 0012), and "idle time" (the
full JID case in 0012). In XEP-0256, the distinguishing difference
seems to be "initial presence" vs "away or extended away". I feel like
this distinction is a little ambiguous. In my client(s) (and I believe
in several others) the concepts of "away" and "idle" are independent, so
there's nothing preventing you from being "idle" without being "away".
Also, from my understanding of XMPP (and someone please correct me if
I'm wrong here), there's nothing wrong with an initial presence having a
'show' tag contianing 'away' or 'xa'.
So given a presence packet , I can't tell if I'm being told how idle a
user is, or how long it has been since they logged in.
The second issue is that some servers (notably google/gmail) don't seem
to implement XEP-0203 (Delayed Delivery) for presence packets, so even
if I knew which piece of information is being conveyed to me, I can't
reliably tell how stale that information might be if I recently
reconnected, or if the servers recently went through some sort of
split/join event. When I first log in, it looks like all my idle gmail
buddies have been idle for 5 minutes or 10 minutes (depending on how
they have their client set up).
Apple seems to have invented their own (undocumented as far as I can
tell, but pretty self-explanatory) protocol for idle time. It looks like:
<presence from=juliet at capulet.com/balcony' '>
Even without documentation, I like that this is much clearer about the
information being conveyed, and frankly I'd rather deal with the
(increasingly rare) problem of clock drift, than something not being
implemented by a particular server. I think we could take this "style"
of protocol, and perhaps add "previous-login" and "online-since" to
cover all of the XEP-0012 bases. I'm assuming it would be a bad idea to
just document their protocol, especially if we add to it (or they change
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Standards