%ents; ]>
Invisible Presence Documentation of invisible presence. &LEGALNOTICE; 0018 Rejected Informational Standards JIG XMPP Core, XMPP IM None None N/A Ben Schumacher ben@blahr.com rynok@jabber.com Jeremie Miller jer@jabber.org jer@jabber.org 0.2 2003-09-26 bs Updated to focus solely on <presence type='invisible'/>. 0.1 2002-01-28 jmm Initial draft.

Jabber users have long wanted the ability to come online using Jabber, but appear "unavailable" to a subset of their roster, an ability which is commonly referred to as invisible mode. While several current implementations have various ways of providing this functionality, the systems currently in place often lack clear behavior and documentation. This document provides requirements for invisible mode and clarifies the existing protocol-in-use to provide the desired functionality.

Note well: The functionality described herein can and should be implemented by means of the Privacy Rules namespace defined in &xmppim;. This document is provided for historical purposes only.

The requirements for invisible mode are basic:

  1. A user should be able to become visible or invisible at any time.
  2. When in either mode, users should be able to selectively allow or block presence updates to be distributed to their contacts.

For the purposes of this discussion, we will assume this terminology.

Assuming the user's client has authenticated with the system normally, it would send the following presence stanza to become invisible (note: this can be the initial presence stanza sent by the user). To do so, the client will send undirected presence with a type="invisible" attribute.

]]>

If a user chooses to become visible after being invisible, the client will send undirected presence with a type="visible" attribute.

]]>

If a user is visible to all of their contacts, and wishes to become invisible to selected contacts on their roster, then their client will send the following directed presence stanza.

]]>

In this case, the server begins to track that the user is invisible to the contact joe@foo.com, and does not forward further presence updates to joe@foo.com. If the user wishes joe@foo.com to received further presence updates, then their client must send either an undirected presence stanza with a type="visible" attribute (see Example 2), or a directed presence stanza to joe@foo.com with a type="visible" attribute as below.

]]>

The opposite behavior of the previous section should, also, be present in the server. For example, if a user is invisible to all of their contacts, they should be able to become visible to a selected contact by send a stanza similar to the one in Example 4.

As with the previous section, a user can later choose to hide his presence updates for joe@foo.com by either sending an undirected presence stanza (see Example 1), or by sending a directed presence stanza to joe@foo.com (see Example 3).

The above section documents the major points of the invisible mode protocol. It is important to understand how the server should interact with the protocol documented above.

Normally, when a server receives a presence stanza, it stamps the appropriate 'from' attribute on the stanza and sends it on its way. If the stanza does not possess a 'to' attribute, the process of sending the stanza on its way involves broadcasting that stanza to all contacts listed in the user's roster. If the stanza does have a 'to' attribute, the stanza is simply routed to the correct contact. With the addition of invisible mode presence, the server MUST now verify that a stanza should be directed to contacts on a user's roster before sending it on. In addition, stanzas that are directly related to invisible presence (stanzas with a 'type' attribute of either "visible" or "invisible") MUST NOT be sent to any contacts, but MAY cause other presence stanzas to be sent instead.

One of the biggest failings of older invisible mode implementations were client features like auto-away. In most cases, these auto-away stanza would inadvertently cause a user to become visible (although away) to all contacts on its roster. This invisible presence protocol has been designed to deal with that problem elegantly.

Consider the following situation (the protocol for which is shown in the examples below):

  1. joe@foo.com has contacts stpeter@foo.com, pgmillard@foo.com and rynok@foo.com on his roster.
  2. joe@foo.com has logged into the foo.com sever, but has set his presence to invisible.
  3. Assume that stpeter@foo.com, pgmillard@foo.com and rynok@foo.com are all online and visible.
  4. joe@foo.com wants rynok@foo.com to see his presence updates, but not stpeter@foo.com or pgmillard@foo.com
  5. joe@foo.com sets his presence to extended away.
  6. joe@foo.com decides to become visible to all contacts on his roster.
  7. joe@foo.com decides to become invisible to pgmillard@foo.com.
  8. joe@foo.com set his presence to free to chat.
]]>

Since joe@foo.com has just come online, the server SHOULD NOT forward any presence stanzas to contacts on his roster.

]]> ]]> xaAway (due to idle)]]> awayMeeting ]]>

Note that in this example, presence updates from joe@foo.com are routed only to rynok@foo.com, despite the fact that stpeter@foo.com and pgmillard@foo.com are both online and available. This is because joe@foo.com has chosen to be visible only to rynok@foo.com. If joe@foo.com chooses to become visible to his entire roster, he simply sends an undirected presence stanza with the type="visible" attribute. In this case the server SHOULD forward the last undirected presence stanza received to stpeter@foo.com and pgmillard@foo.com.

]]> ]]>

Now Joe has decided that he doesn't want pgmillard@foo.com to receive further presence updates. Since he is currently visible to all contacts, he simply needs to send a directed presence stanza to pgmillard@foo.com with the type="invisible" attribute set.

]]>

In this case, the server will send a directed presence stanza to pgmillard@foo.com with the type="unavailable" attribute set, which indicates to pgmillard@foo.com's client that joe@foo.com has gone "offline."

]]>

Further presence updates sent by joe@foo.com will now be forwarded to stpeter@foo.com and rynok@foo.com, and MUST NOT be forwarded pgmillard@foo.com.

chat]]> chat chat ]]>

The server MUST NOT forward presence stanzas containing the type="visible" or type="invisible" attribute to a client.

There are no security features or concerns related to this proposal.

No interaction with &IANA; is required as a result of this document.

No namespaces or parameters need to be registered with the ®ISTRAR; as a result of this document.