This document specifies an XMPP-compatible protocol for user invisibility.
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Publisher: XMPP Standards Foundation
Type: Standards Track
Last Updated: 2006-08-09
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0030
Superseded By: None
Short Name: invisibility
Wiki Page: <http://wiki.jabber.org/index.php/Invisible Command (XEP-0186)>
This XMPP Extension Protocol is copyright 1999 - 2007 by the XMPP Standards Foundation (XSF) and is in full conformance with the XSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards discussion list: <http://mail.jabber.org/mailman/listinfo/standards>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) 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.
The following 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".
Jabber instant messaging technologies have long supported the ability for IM users to be online but appear invisible. The existing protocols for doing so are:
Invisible Presence  -- this protocol is not compatible with XMPP Core  and XMPP IM , and it does not provide reliable documentation of the protocol in use since many server implementations support presence of type "invisible" but not presence of type "visible".
Invisibility  -- this protocol is in many ways a mis-use of privacy lists for the temporary purpose of appearing invisible rather than the intended purpose of permanently blocking communications.
In order to provide a standards-compliant protocol that can be used in the long term, this document defines an IQ-based protocol that enables an IM user to "go invisible" and "go visible" at will within the context of a given session.
The requirements for invisible mode are straightforward:
In order for a client to discover whether its server supports the protocol defined herein, it MUST send a Service Discovery  information request to the server:
<iq firstname.lastname@example.org/shire' to='tolkien.lit' type='get' id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
If the server supports the protocol defined herein, it MUST return a feature of "http://jabber.org/protocol/invisibility":
<iq email@example.com/shire' to='tolkien.lit' type='get' id='disco1'> <query xmlns='http://jabber.org/protocol/disco#info'> ... <feature var='http://jabber.org/protocol/invisibility'/> ... </query> </iq>
A client SHOULD complete this service discovery process before sending initial presence to its server.
In order for a client to go invisible, it shall send an IQ-set with no 'to' address (thus handled by the user's server) containing an <invisible/> element qualified by the 'http://jabber.org/protocol/invisibility' namespace:
<iq type='set' id='inv1'> <invisible xmlns='http://jabber.org/protocol/invisibility'/> </iq>
If the server can successfully process the invisibility command, it MUST return an IQ-result:
<iq type='result' id='inv1'/>
(Standard XMPP stanza errors apply; see RFC 3920 and Error Condition Mappings .)
If the client enters invisible mode after having previously sent undirected presence with no 'type' attribute (e.g., after sending initial presence), the server MUST send <presence type='unavailable'/> presence from the client's resource to all contacts who would receive unavailable presence if the client sent <presence type='unavailable'/>.
While the client is in invisible mode, the server:
MUST NOT broadcast presence notifications as a result of receiving any subsequent undirected presence notifications from the client.
MUST deliver directed presence stanzas generated by the client.
MUST deliver inbound <presence/> stanzas.
SHOULD deliver inbound <message/> stanzas whose 'to' address is the bare JID of the user (subject to standard XMPP stanza handling rules).
MUST deliver inbound <message/> and <iq/> stanzas whose 'to' address is the resource of the client.
MUST deliver outbound <message/> and <iq/> stanzas generated by the client (for an important note regarding presence leaks, see the Security Considerations section of this document).
If after sending directed presence the client then sends <presence type='unavailable'/>, the server MUST deliver that unavailable presence only to the entities to which the client sent directed presence after going invisible.
In order for a client to become visible again, it shall send an IQ-set with no 'to' address (thus handled by the user's server) containing a <visible/> element qualified by the 'http://jabber.org/protocol/invisibility' namespace:
<iq type='set' id='vis1'> <visible xmlns='http://jabber.org/protocol/invisibility'/> </iq>
If the server can successfully process the visibility command, it MUST return an IQ-result:
<iq type='result' id='vis1'/>
When the client becomes visible, the server MUST treat that state as equivalent to an active session before receiving initial presence from the client. It is the responsibility of the client to send an undirected presence notification to the server, which the server MUST broadcast to all entities who would normally receive presence broadcasts from the client (as well as any other entities to which the client sent directed presence while invisible).
It is possible to leak presence while in invisible mode (for example, by sending a message, IQ, or presence stanza to a contact). A client SHOULD warn a user before allowing the client to generate any outbound traffic and MUST NOT respond to IQ requests received from entities with which it has not initiated communications while in invisible mode (e.g., by sending messages, IQs, or directed presence).
No interaction with the Internet Assigned Numbers Authority (IANA)  is required as a result of this document.
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://jabber.org/protocol/invisibility' xmlns='http://jabber.org/protocol/invisibility' elementFormDefault='qualified'> <xs:element name='invisible' type='empty'/> <xs:element name='visible' type='empty'/> <xs:simpleType name='empty'> <xs:restriction base='xs:string'> <xs:enumeration value=''/> </xs:restriction> </xs:simpleType> </xs:schema>
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://www.xmpp.org/registrar/>.
Added XMPP Registrar considerations and XML schema.(psa)
Added inbound presence rule to server handling section.(psa)
Clarified that invisibility mode does not carry across sessions.(psa)
Recommended delivery of messages sent to bare JID.(psa)