XEP-0162: Best Practices for Roster and Subscription Management

Abstract:This document specifies best practices for roster and subscription management in Jabber/XMPP clients.
Author:Lucas Nussbaum
Copyright:© 1999 - 2014 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:Deferred
Type:Informational
Version:0.2
Last Updated:2005-12-06

WARNING: Consideration of this document has been Deferred by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended.


Table of Contents


1. Introduction
    1.1. Motivation
    1.2. Overview of subscription states
2. Removal of Contacts
3. Display of Contacts in the Roster
    3.1. Name of the Hidden group

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

1.1 Motivation

RFC 3921 [1] 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.

1.2 Overview of subscription states

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

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

2. Removal of Contacts

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.

3. Display of Contacts in the Roster

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

3.1 Name of the Hidden group

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

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 Private XML Storage (XEP-0049) [3].


Appendices


Appendix A: Document Information

Series: XEP
Number: 0162
Publisher: XMPP Standards Foundation
Status: Deferred
Type: Informational
Version: 0.2
Last Updated: 2005-12-06
Approving Body: XMPP Council
Dependencies: None
Supersedes: None
Superseded By: None
Short Name: N/A
Source Control: HTML
This document in other formats: XML  PDF


Appendix B: Author Information

Lucas Nussbaum

Email: lucas@lucas-nussbaum.net
JabberID: lucas@nussbaum.fr


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright © 1999 - 2014 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. ##

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 from, out of, or in connection with the Specification or the implementation, deployment, or other use of 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/about-xmpp/xsf/xsf-ipr-policy/> or obtained by writing to XMPP Standards Foundation, 1899 Wynkoop Street, Suite 600, Denver, CO 80202 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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. RFC 3921: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence <http://tools.ietf.org/html/rfc3921>.

2. XEP-0083: Nested Roster Groups <http://xmpp.org/extensions/xep-0083.html>.

3. XEP-0049: Private XML Storage <http://xmpp.org/extensions/xep-0049.html>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.2 (2005-12-06)

Added a note about the name of the Hidden group. Clarified which items should be displayed. (lnu)

Version 0.1 (2005-10-19)

Initial version. (lnu)

Version 0.0.3 (2005-10-18)

Added a remark about "Remove" vs "Block" in other IM systems. (lnu)

Version 0.0.2 (2005-10-07)

Integrated some feedback from Standards list discussion. (lnu)

Version 0.0.1 (2005-10-04)

First draft. (lnu)

END