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-0162.xml 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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>Best Practices for Roster and Subscription Management</title>
  10. <abstract>This document specifies best practices for roster and subscription management in Jabber/XMPP clients.</abstract>
  11. &LEGALNOTICE;
  12. <number>0162</number>
  13. <status>Deferred</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <dependencies/>
  17. <supersedes/>
  18. <supersededby/>
  19. <shortname>N/A</shortname>
  20. <author>
  21. <firstname>Lucas</firstname>
  22. <surname>Nussbaum</surname>
  23. <email>lucas@lucas-nussbaum.net</email>
  24. <jid>lucas@nussbaum.fr</jid>
  25. </author>
  26. <revision>
  27. <version>0.2</version>
  28. <date>2005-12-06</date>
  29. <initials>lnu</initials>
  30. <remark>Added a note about the name of the Hidden group. Clarified which items should be displayed.</remark>
  31. </revision>
  32. <revision>
  33. <version>0.1</version>
  34. <date>2005-10-19</date>
  35. <initials>lnu</initials>
  36. <remark>Initial version.</remark>
  37. </revision>
  38. <revision>
  39. <version>0.0.3</version>
  40. <date>2005-10-18</date>
  41. <initials>lnu</initials>
  42. <remark>Added a remark about "Remove" vs "Block" in other IM systems.</remark>
  43. </revision>
  44. <revision>
  45. <version>0.0.2</version>
  46. <date>2005-10-07</date>
  47. <initials>lnu</initials>
  48. <remark>Integrated some feedback from Standards list discussion.</remark>
  49. </revision>
  50. <revision>
  51. <version>0.0.1</version>
  52. <date>2005-10-04</date>
  53. <initials>lnu</initials>
  54. <remark>First draft.</remark>
  55. </revision>
  56. </header>
  57. <section1 topic='Introduction' anchor='intro'>
  58. <section2 topic='Motivation' anchor='intro-motive'>
  59. <p>&rfc3921; explains how subscriptions and rosters integrate. However,
  60. several points are left to the client author's discretion, and this can lead
  61. to some confusion among client developers. This document specifies best practices
  62. that enable all Jabber clients to manage subscriptions and roster in a coherent
  63. way, thus making sure that such clients will not surprise end users with
  64. unexpected behavior.</p>
  65. </section2>
  66. <section2 topic='Overview of subscription states' anchor='intro-oversub'>
  67. <p>As defined in RFC 3921 (sections 6, 7, 8), a roster item can have one
  68. of the following subscription states:</p>
  69. <ul>
  70. <li><em>subscription='none'</em>: you aren't interested in the item's
  71. presence, and neither is the item interested in yours.</li>
  72. <li><em>subscription='from'</em>: the item is interested in your
  73. presence information, but you don't care about the contact. (You must
  74. be somebody important! ;)</li>
  75. <li><em>subscription='to'</em>: You are interested in the item's
  76. presence information, but the contact is not interested in
  77. yours.</li>
  78. <li><em>subscription='both'</em>: You and the contact are interested in each other's presence information.</li>
  79. </ul>
  80. <p>Additionally, if <em>subscription='from'</em> or
  81. <em>subscription='none'</em>, you can have <em>ask='suscribe'</em>, which
  82. means you sent a subscription request to the item but haven't received an
  83. answer yet.</p>
  84. </section2>
  85. </section1>
  86. <section1 topic='Removal of Contacts' anchor='removal'>
  87. <p>It is necessary to distinguish two things:</p>
  88. <ul>
  89. <li>Removal from the user's roster (does the user's roster include an entry
  90. for this JID?) ;</li>
  91. <li>Removal of presence subscription (cancellation of subscription).</li>
  92. </ul>
  93. <p>Three problems have to be taken into consideration here:</p>
  94. <ul>
  95. <li>Removing an item from your roster (i.e., performing a roster set with <em>subscription='remove'</em>) cancels all subscriptions (both from
  96. the item and to the item).</li>
  97. <li>The fact that a user is no longer interested in the contact's
  98. presence doesn't mean that the contact is no longer interested in the
  99. user's presence.</li>
  100. <li>This is complex, and should be presented in a simple way to the
  101. user.</li>
  102. </ul>
  103. <p>Therefore, the following behavior is RECOMMENDED for Jabber clients:</p>
  104. <ol>
  105. <li><p>When the user asks for the removal of an item with
  106. <em>subscription='both'</em>, the Jabber client SHOULD ask the user whether
  107. he wants to revoke the contact's authorization to see the user's presence
  108. too. This action SHOULD be called "Remove" since this is the convention used
  109. by other IM systems.</p></li>
  110. <li>
  111. <p>The Jabber client SHOULD NOT remove the contact from the roster. There
  112. are two exceptions:</p>
  113. <ol style='list-style-type: lower-alpha'>
  114. <li><p>The Jabber client MAY remove the contact from the roster if the user
  115. explicitely asked (so the user has to be informed he might remove both
  116. presence subscriptions).</p></li>
  117. <li><p>The jabber client MAY transparently remove the contact from the roster if
  118. the user asked to, and if <em>subscription='none'</em> or
  119. <em>subscription='to'</em>.</p></li>
  120. </ol>
  121. </li>
  122. </ol>
  123. <p>In addition to the "Remove" action described above, the client MAY
  124. provide a way to revoke the contact's subscription to the user's presence.
  125. This action, if provided, SHOULD be called "Block" since this is the
  126. convention used by other IM networks.</p>
  127. </section1>
  128. <section1 topic='Display of Contacts in the Roster' anchor='contacts'>
  129. <p>Defining a sensible roster policy is difficult, because many users have different, special needs. We have to ensure that:</p>
  130. <ul>
  131. <li>Most contacts that everybody wants to hide are hidden.</li>
  132. <li>No contact that someone wants to see is hidden.</li>
  133. </ul>
  134. <p>The user's roster contains both contacts of interest for the user
  135. (contacts with <em>subscription='both'</em> or <em>subscription='to'</em>) and contacts which
  136. are only interested in receiving the user's presence information. Also, the
  137. user might be interested in having some contacts even with
  138. <em>subscription='none'</em>, because he often send messages to them but isn't
  139. interested in their presence.</p>
  140. <p>Therefore, the following types of contacts SHOULD be displayed by clients:</p>
  141. <ul>
  142. <li>items with <em>subscription='both'</em> or <em>subscription='to'</em> ;</li>
  143. <li>items with <em>subscription='none'</em> or <em>subscription='from'</em> and <em>ask='subscribe'</em>. It is ((subscription='none' or subscription='from') and ask='subscribe') ;</li>
  144. <li>items with <em>subscription='none'</em> or <em>subscription='from'</em> which have a 'name' attribute or a 'group' child set. It is ((subscription='none' or subscription='from') and (name attribute or group child)).</li>
  145. </ul>
  146. <p>The client MAY display contacts with subscription='from' which don't match
  147. one of the above cases in an additional 'Observers' group. If no 'Observers' group is
  148. used, the client SHOULD NOT display contacts which don't match one of the
  149. above rules.</p>
  150. <p>Some users give nicknames to contacts they do not want to see, to be able to remember who they are when cleaning the roster. An additional 'Hidden' group MAY be used to handle such contacts. The client SHOULD NOT display contacts if one of their groups is the 'Hidden' group. (This mean that if contact 'C' is in groups 'G' and 'Hidden', 'C' should never be displayed, even in group 'G'.)</p>
  151. <section2 topic='Name of the Hidden group' anchor='hiddenname'>
  152. <p>The name of the 'Hidden' group can be managed in two different ways :</p>
  153. <ul>
  154. <li>It could always be named 'Hidden' but be displayed translated by the client ;</li>
  155. <li>It could be named as the user wants. Its name could then be stored using jabber:iq:private, like the delimiter for nested groups in &xep0083;.</li>
  156. </ul>
  157. <p>This is left as an open issue since no clients (to the author's knowledge) implement this 'Hidden' group. But the preference should go to the first solution, which avoids relying on &xep0049;.</p>
  158. </section2>
  159. </section1>
  160. </xep>