Abstract: | This specification defines a way to use the Last Activity extension in XMPP presence notifications. |
Author: | Peter Saint-Andre |
Copyright: | © 1999 – 2018 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Draft |
Type: | Standards Track |
Version: | 1.1 |
Last Updated: | 2009-09-15 |
NOTICE: The protocol defined herein is a Draft Standard of the XMPP Standards Foundation. Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.
1. Use Cases
1.1. Initial Presence
1.2. Away and Extended Away
2. Security Considerations
3. IANA Considerations
4. XMPP Registrar Considerations
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Last Activity (XEP-0012) [1] defines a method for determining the last time that an XMPP entity was active. This document specifies that an online client MAY include last activity information when sending a presence update. Including such information essentially means "when I sent this presence notification I had last been active at time T".
There are two primary use cases:
The following sections show examples of each use case.
When a client begins a presence session, it can indicate when that particular client was last online. It does this by sending initial presence with a last activity notation.
Example 1. Last Indication in Initial Presence
<presence from='juliet@capulet.com/balcony'> <query xmlns='jabber:iq:last' seconds='86511'/> </presence>
This can be read as "I'm now online and I was last online at this client 24 hours and 111 seconds ago".
Including last activity information in an initial presence notification enables Publish-Subscribe (XEP-0060) [2] and Personal Eventing Protocol (XEP-0163) [3] nodes to optimize item delivery (e.g., by sending only the items that were published after a subscriber went offline the last time) and enables Multi-User Chat (XEP-0045) [4] rooms to optimize the delivery of discussion history messages.
When a client automatically sets the user's <show/> value to "away" or "xa" (extended away), it can indicate when that particular was last active during the current presence session.
Example 2. Last Indication in Auto-Away
<presence from='juliet@capulet.com/balcony'> <show>away</show> <query xmlns='jabber:iq:last' seconds='600'/> </presence>
This can be read as "I just went away and I was last active 10 minutes ago".
If one of the user's contacts receives that presence notification with delayed delivery (see Delayed Delivery (XEP-0203) [5]) on login in response to a presence probe as described in XMPP IM [6], the contact will then know how long the user has been idle (i.e., the number of seconds since the delayed delivery timestamp, plus the iq:last seconds). Thus the contact does not need to send an iq:last query.
Example 3. Last Indication in Auto-Away With Delayed Delivery
<presence from='juliet@capulet.com/balcony' to='romeo@montague.net'> <show>away</show> <query xmlns='jabber:iq:last' seconds='600'/> <delay xmlns='urn:xmpp:delay' from='capulet.com' stamp='2002-09-10T23:41:07Z'/> </presence>
Including a last activity notation in presence notifications can enable those who receive such notifications to determine exactly when a user has stopped interacting with his or her XMPP client, but this information is in essence already available if the user publishes timely presence updates. Therefore, this specification introduces no new vulnerabilities.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
This document requires no interaction with the XMPP Registrar [8].
Series: XEP
Number: 0256
Publisher: XMPP Standards Foundation
Status:
Draft
Type:
Standards Track
Version: 1.1
Last Updated: 2009-09-15
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0012
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
xsf@stpeter.im
JabberID:
peter@jabber.org
URI:
http://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0012: Last Activity <https://xmpp.org/extensions/xep-0012.html>.
2. XEP-0060: Publish-Subscribe <https://xmpp.org/extensions/xep-0060.html>.
3. XEP-0163: Personal Eventing Protocol <https://xmpp.org/extensions/xep-0163.html>.
4. XEP-0045: Multi-User Chat <https://xmpp.org/extensions/xep-0045.html>.
5. XEP-0203: Delayed Delivery <https://xmpp.org/extensions/xep-0203.html>.
6. RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc6121>.
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Added use case for initial presence.
(psa)Per a vote of the XMPP Council, advanced specification to Draft.
(psa)Initial published version; removed note about handling the absence of a last activity notation; added security considerations.
(psa)Rough draft based on list discussion.
(psa)END