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

xep-0319.xml 6.3KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Last User Interaction in Presence</title>
  10. <abstract>This specification defines a way to communicate time of last user interaction with her system using XMPP presence notifications.</abstract>
  12. <number>0319</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XMPP IM</spec>
  19. <spec>XEP-0082</spec>
  20. </dependencies>
  21. <supersedes>
  22. <spec>XEP-0256</spec>
  23. </supersedes>
  24. <supersededby/>
  25. <shortname>idle</shortname>
  26. &tobias;
  27. <revision>
  28. <version>1.0.2</version>
  29. <date>2017-07-17</date>
  30. <initials>egp</initials>
  31. <remark><p>Make the schema more precise about a date being a xs:dateTime.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>1.0.1</version>
  35. <date>2017-05-30</date>
  36. <initials>egp</initials>
  37. <remark><p>Be precise about the &xep0082; profile used.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>1.0</version>
  41. <date>2015-04-02</date>
  42. <initials>XEP editor (mam)</initials>
  43. <remark><p>Per a vote of the XMPP Council, advanced specification from Experimental to Draft.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.2</version>
  47. <date>2013-08-27</date>
  48. <initials>tobias</initials>
  49. <remark><p>Fix issues raised in XMPP Council meeting.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.1</version>
  53. <date>2013-03-04</date>
  54. <initials>psa</initials>
  55. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  56. </revision>
  57. <revision>
  58. <version>0.0.1</version>
  59. <date>2013-02-17</date>
  60. <initials>tobias</initials>
  61. <remark><p>Initial version.</p></remark>
  62. </revision>
  63. </header>
  64. <section1 topic='Introduction' anchor='intro'>
  65. <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>
  66. <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>
  67. <p>Experience has shown a number of issues with &xep0256;:</p>
  68. <ul>
  69. <li>The use of relative durations is too vague. It requires additional information from &xep0203; to provide a reliable user experience.</li>
  70. <li>Distinguishing between the idle and last online use cases is very difficult.</li>
  71. <li>It is desirable to have idle time indiciated for &PRESENCE; &lt;show/&gt; values other than "away" and "xa".</li>
  72. </ul>
  73. <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>
  74. </section1>
  75. <section1 topic='Use Cases' anchor='usecases'>
  76. <p>There are two main use cases for this extension, explained in more detail in the following sections.</p>
  77. <section2 topic='Presence with Last Interaction' anchor='last-interact'>
  78. <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>
  79. <example caption='Time of Last User Interaction in Auto-Away'><![CDATA[
  80. <presence from=''>
  81. <show>away</show>
  82. <idle xmlns='urn:xmpp:idle:1' since='1969-07-21T02:56:15Z'/>
  83. </presence>
  84. ]]></example>
  85. <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>
  86. </section2>
  87. <section2 topic='Presence Indicating User Coming Back From Idle' anchor='back-from-idle'>
  88. <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>
  89. <example caption='Presence Indicating Return to Device'><![CDATA[
  90. <presence from='' />
  91. ]]></example>
  92. </section2>
  93. </section1>
  94. <section1 topic='XML Schema' anchor='schema'>
  95. <code><![CDATA[
  96. <?xml version="1.0" encoding="utf-8"?>
  97. <xs:schema
  98. xmlns:xs=""
  99. elementFormDefault="qualified"
  100. targetNamespace="urn:xmpp:idle:1"
  101. xmlns="urn:xmpp:idle:1">
  102. <xs:annotation>
  103. <xs:documentation>
  104. The protocol documented by this schema is defined in
  105. XEP-0319:
  106. </xs:documentation>
  107. </xs:annotation>
  108. <xs:element name="idle">
  109. <xs:complexType>
  110. <xs:attribute name="since" use="required" type="xs:dateTime"/>
  111. </xs:complexType>
  112. </xs:element>
  113. </xs:schema>
  114. ]]></code>
  115. </section1>
  116. <section1 topic='Acknowledgements' anchor='ack'>
  117. <p>Thanks to Florian Schmaus, Christian Schudt, and Lance Stout for their helpful comments.</p>
  118. </section1>
  119. <section1 topic='Security Considerations' anchor='security'>
  120. <p>The security considerations of <cite>XEP-0082</cite> apply to this protocol.</p>
  121. <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>
  122. </section1>
  123. <section1 topic='IANA Considerations' anchor='iana'>
  124. <p>This document requires no interaction with &IANA;.</p>
  125. </section1>
  126. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  127. <section2 topic='Protocol Namespace'>
  128. <p>The &REGISTRAR; shall add 'urn:xmpp:idle:1' to its registry at <link url=''></link>.</p>
  129. </section2>
  130. </section1>
  131. </xep>