<p>Some instant messaging implementations of the Jabber/XMPP protocols have long supported the ability for IM users to be online but appear invisible. The existing protocols for doing so are:</p>
<li><p>&xep0018; -- this protocol is not compatible with &xmppcore; and &xmppim;, and the speciifcation 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".</p></li>
<li><p>&xep0126; -- 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.</p></li>
<p>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 become "invisible" and "visible" at will within the context of a given session. This protocol is intended to supersede the protocols described in <cite>XEP-0018</cite> and <cite>XEP-0126</cite>.</p>
<li>Invisible mode is active only for the current session; if the user ends that session and starts another session, the invisibility mode set for the previous session does not carry over to the new session.</li>
<p>In order for a client to discover whether its server supports the protocol defined herein, it MUST send a &xep0030; information request to the server:</p>
<p>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://www.xmpp.org/extensions/xep-0186.html#ns' namespace &NSNOTE;.</p>
<p>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 &UNAVAILABLE; presence from the specified resource to all contacts who would receive unavailable presence if the client sent &UNAVAILABLE;.</p>
<li><p>SHOULD deliver inbound &MESSAGE; stanzas whose 'to' address is the bare JID (&BAREJID;) of the user (subject to standard XMPP stanza handling rules).</p></li>
<li><p>MUST deliver inbound &MESSAGE; and &IQ; stanzas whose 'to' address is the full JID (&FULLJID;) corresponding to the resource of the client.</p></li>
<li><p>MUST deliver outbound &MESSAGE; and &IQ; stanzas generated by the client (for an important note regarding presence leaks, see the <linkurl='#security'>Security Considerations</link> section of this document).</p></li>
</ol>
<p>If after sending directed presence the client then sends &UNAVAILABLE;, the server MUST deliver that unavailable presence only to the entities to which the client sent directed presence after going invisible.</p>
<p>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://www.xmpp.org/extensions/xep-0186.html#ns' namespace &NSNOTE;.</p>
<p>When the client becomes visible, the server MUST treat that state as equivalent to an active session before receiving initial presence from the client.</p>
<p>It is the responsibility of the client to send an undirected presence notification to the server.</p>
<p>The server then MUST broadcast that presence 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).</p>
<p>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).</p>
<p>Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0186.html#ns"; upon advancement of this specification, the ®ISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.</p>