You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
6.3 KiB

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Last User Interaction in Presence</title>
<abstract>This specification defines a way to communicate time of last user interaction with her system using XMPP presence notifications.</abstract>
<type>Standards Track</type>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<remark><p>Make the schema more precise about a date being a xs:dateTime.</p></remark>
<remark><p>Be precise about the &xep0082; profile used.</p></remark>
<initials>XEP editor (mam)</initials>
<remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft.</p></remark>
<remark><p>Fix issues raised in XMPP Council meeting.</p></remark>
<remark><p>Initial published version approved by the XMPP Council.</p></remark>
<remark><p>Initial version.</p></remark>
<section1 topic='Introduction' anchor='intro'>
<p>This protocol describes a way to communicate a user's last interaction time with other XMPP entities over &PRESENCE; stanzas. For the purposes of this document, user interaction here refers to a human end user interacting with her device by means of a keyboard, mouse, touch screen, and so on. Based on this information XMPP clients can display the time a contact went idle or a duration for how long a contact has been idle, thereby allowing end users to estimate the expected responsiveness of their contacts.</p>
<p>This protocol uses absolute timestamps formatted according to the DateTime profile of &xep0082;, indicated as value of the 'since' attribute in the &lt;idle/&gt; element.</p>
<p>Experience has shown a number of issues with &xep0256;:</p>
<li>The use of relative durations is too vague. It requires additional information from &xep0203; to provide a reliable user experience.</li>
<li>Distinguishing between the idle and last online use cases is very difficult.</li>
<li>It is desirable to have idle time indiciated for &PRESENCE; &lt;show/&gt; values other than "away" and "xa".</li>
<p>Updating <cite>XEP-0256</cite> directly would be problematic as it would break compatibility with existing implementations. Instead a new protocol is described for handling the idle time use case; the last online use case is handled by &xep0312;.</p>
<section1 topic='Use Cases' anchor='usecases'>
<p>There are two main use cases for this extension, explained in more detail in the following sections.</p>
<section2 topic='Presence with Last Interaction' anchor='last-interact'>
<p>After a user has not interacted with her device for some amount of time the user wants to inform her contacts about this fact. The client sends a &PRESENCE; stanza with time of last interaction.</p>
<example caption='Time of Last User Interaction in Auto-Away'><![CDATA[
<presence from=''>
<idle xmlns='urn:xmpp:idle:1' since='1969-07-21T02:56:15Z'/>
<p>The amount of time the user has to be idle before a client sends this enhanced presence is application-specific; it is suggested that a sensible default interval of 5 minutes be used.</p>
<section2 topic='Presence Indicating User Coming Back From Idle' anchor='back-from-idle'>
<p>When a user comes back and uses her device again the client informs user's contacts by sending a normal presence stanza like shown in the following example, omiting the &lt;idle/&gt; element.</p>
<example caption='Presence Indicating Return to Device'><![CDATA[
<presence from='' />
<section1 topic='XML Schema' anchor='schema'>
<?xml version="1.0" encoding="utf-8"?>
The protocol documented by this schema is defined in
<xs:element name="idle">
<xs:attribute name="since" use="required" type="xs:dateTime"/>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Florian Schmaus, Christian Schudt, and Lance Stout for their helpful comments.</p>
<section1 topic='Security Considerations' anchor='security'>
<p>The security considerations of <cite>XEP-0082</cite> apply to this protocol.</p>
<p>This specification introduces no new security or privacy concerns. While including a last user interaction notation in &PRESENCE; updates can enable recipients to determine exactly when a user has stopped interacting with her XMPP client or even their system, this information is in essence already available if the user's client publishes timely presence updates.</p>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespace'>
<p>The &REGISTRAR; shall add 'urn:xmpp:idle:1' to its registry at <link url=''></link>.</p>