%ents; ]>
Best Practices for Roster and Subscription Management This document specifies best practices for roster and subscription management in Jabber/XMPP clients. &LEGALNOTICE; 0162 Deferred Informational Standards N/A Lucas Nussbaum lucas@lucas-nussbaum.net lucas@nussbaum.fr 0.2.1 2020-06-25 ps Fixed small typos 0.2 2005-12-06 lnu Added a note about the name of the Hidden group. Clarified which items should be displayed. 0.1 2005-10-19 lnu Initial version. 0.0.3 2005-10-18 lnu Added a remark about "Remove" vs "Block" in other IM systems. 0.0.2 2005-10-07 lnu Integrated some feedback from Standards list discussion. 0.0.1 2005-10-04 lnu First draft.

&rfc3921; explains how subscriptions and rosters integrate. However, several points are left to the client author's discretion, and this can lead to some confusion among client developers. This document specifies best practices that enable all Jabber clients to manage subscriptions and roster in a coherent way, thus making sure that such clients will not surprise end users with unexpected behavior.

As defined in RFC 3921 (sections 6, 7, 8), a roster item can have one of the following subscription states:

  • subscription='none': you aren't interested in the item's presence, and neither is the item interested in yours.
  • subscription='from': the item is interested in your presence information, but you don't care about the contact. (You must be somebody important! ;)
  • subscription='to': You are interested in the item's presence information, but the contact is not interested in yours.
  • subscription='both': You and the contact are interested in each other's presence information.

Additionally, if subscription='from' or subscription='none', you can have ask='subscribe', which means you sent a subscription request to the item but haven't received an answer yet.

It is necessary to distinguish two things:

Three problems have to be taken into consideration here:

Therefore, the following behavior is RECOMMENDED for Jabber clients:

  1. When the user asks for the removal of an item with subscription='both', the Jabber client SHOULD ask the user whether he wants to revoke the contact's authorization to see the user's presence too. This action SHOULD be called "Remove" since this is the convention used by other IM systems.

  2. The Jabber client SHOULD NOT remove the contact from the roster. There are two exceptions:

    1. The Jabber client MAY remove the contact from the roster if the user explicitely asked (so the user has to be informed he might remove both presence subscriptions).

    2. The jabber client MAY transparently remove the contact from the roster if the user asked to, and if subscription='none' or subscription='to'.

In addition to the "Remove" action described above, the client MAY provide a way to revoke the contact's subscription to the user's presence. This action, if provided, SHOULD be called "Block" since this is the convention used by other IM networks.

Defining a sensible roster policy is difficult, because many users have different, special needs. We have to ensure that:

The user's roster contains both contacts of interest for the user (contacts with subscription='both' or subscription='to') and contacts which are only interested in receiving the user's presence information. Also, the user might be interested in having some contacts even with subscription='none', because he often sends messages to them but isn't interested in their presence.

Therefore, the following types of contacts SHOULD be displayed by clients:

The client MAY display contacts with subscription='from' which don't match one of the above cases in an additional 'Observers' group. If no 'Observers' group is used, the client SHOULD NOT display contacts which don't match one of the above rules.

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

The name of the 'Hidden' group can be managed in two different ways :

  • It could always be named 'Hidden' but be displayed translated by the client ;
  • 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;.

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