XEP-0256: Last Activity in Presence

Abstract:This specification defines a way to use the Last Activity extension in XMPP presence notifications.
Author:Peter Saint-Andre
Copyright:© 1999 - 2009 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Draft
Type:Standards Track
Version:1.0
Last Updated:2009-05-06

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.


Table of Contents


1. Use Case
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


1. Use Case

Last Activity [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 presence updates. The prototypical use case is including the idle time when automatically setting the user's <show/> value to "away" or "xa" (extended away). For example, consider a user who has configured her client to automatically change her presence to "away" after 10 minutes of inactivity. The client could include an iq:last flag to specify how long the user has been idle.

Example 1. Last Indication in Auto-Away

<presence from='juliet@capulet.com/balcony'>
  <show>away</show>
  <query xmlns='jabber:iq:last' seconds='600'/>
</presence>
  

If one of the user's contacts receives that presence notification with delayed delivery (see Delayed Delivery [2]) on login in response to a presence probe as described in XMPP IM [3], 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 2. 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>
  

2. Security Considerations

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.

3. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [4].

4. XMPP Registrar Considerations

This document requires no interaction with the XMPP Registrar [5].


Appendices


Appendix A: Document Information

Series: XEP
Number: 0256
Publisher: XMPP Standards Foundation
Status: Draft
Type: Standards Track
Version: 1.0
Last Updated: 2009-05-06
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0012
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control: HTML  RSS


Appendix B: Author Information

Peter Saint-Andre

JabberID: stpeter@jabber.org
URI: https://stpeter.im/


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2009 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <http://xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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.


Appendix E: Discussion Venue

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>.


Appendix F: Requirements Conformance

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".


Appendix G: Notes

1. XEP-0012: Last Activity <http://xmpp.org/extensions/xep-0012.html>.

2. XEP-0203: Delayed Delivery <http://xmpp.org/extensions/xep-0203.html>.

3. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.

4. 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/>.

5. 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 <http://xmpp.org/registrar/>.


Appendix H: Revision History

Version 1.0 (2009-05-06)

Per a vote of the XMPP Council, advanced specification to Draft.

(psa)

Version 0.1 (2008-11-26)

Initial published version; removed note about handling the absence of a last activity notation; added security considerations.

(psa)

Version 0.0.1 (2008-11-20)

Rough draft based on list discussion.

(psa)

END