xeps/xep-0085.xml

555 lines
29 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE jep SYSTEM '../jep.dtd' [
<!ENTITY % ents SYSTEM '../jep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='../jep.xsl'?>
<jep>
<header>
<title>Chat State Notifications</title>
<abstract>This document defines an XMPP protocol extension for communicating the status of a user in a chat session.</abstract>
&LEGALNOTICE;
<number>0085</number>
<status>Draft</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>JEP-0030</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>chatstates</shortname>
<schemaloc>
<url>http://jabber.org/protocol/chatstates/chatstates.xsd</url>
</schemaloc>
&stpeter;
&dizzyd;
<revision>
<version>1.2</version>
<date>2006-07-12</date>
<initials>psa</initials>
<remark><p>Added service discovery use case.</p></remark>
</revision>
<revision>
<version>1.1</version>
<date>2005-10-05</date>
<initials>psa</initials>
<remark><p>Clarified suggested triggers to discourage prospective notifications.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2005-08-26</date>
<initials>psa</initials>
<remark><p>Per a vote of the Jabber Council, advanced status to Draft.</p></remark>
</revision>
<revision>
<version>0.14</version>
<date>2005-07-20</date>
<initials>psa</initials>
<remark><p>Clarified terminology; specified suggested state changes; removed section on superseding JEP-0022.</p></remark>
</revision>
<revision>
<version>0.13</version>
<date>2005-07-19</date>
<initials>psa</initials>
<remark><p>Further clarified business rules regarding generation of notifications.</p></remark>
</revision>
<revision>
<version>0.12</version>
<date>2005-07-15</date>
<initials>psa</initials>
<remark><p>Clarified business rules regarding generation of notifications; added reference to JEP-0155; rewrote introduction; moved previous introductory text to section on superseding JEP-0022.</p></remark>
</revision>
<revision>
<version>0.11</version>
<date>2005-07-05</date>
<initials>psa</initials>
<remark><p>Removed &lt;initial/&gt; state.</p></remark>
</revision>
<revision>
<version>0.10</version>
<date>2005-06-28</date>
<initials>psa</initials>
<remark><p>Added optional &lt;initial/&gt; state; added business rule on repetition of notifications; added implementation note.</p></remark>
</revision>
<revision>
<version>0.9</version>
<date>2004-10-28</date>
<initials>psa</initials>
<remark><p>Made &lt;inactive/&gt; state definition consistent with &lt;paused/&gt; per list discussion; made slight adjustments to wording throughout.</p></remark>
</revision>
<revision>
<version>0.8</version>
<date>2004-10-28</date>
<initials>psa</initials>
<remark><p>Further clarified state definitions and adjusted suggested event timing.</p></remark>
</revision>
<revision>
<version>0.7</version>
<date>2004-10-27</date>
<initials>psa</initials>
<remark><p>Clarified the meaning of the &lt;gone/&gt; state; adjusted suggested timing for events.</p></remark>
</revision>
<revision>
<version>0.6</version>
<date>2004-02-19</date>
<initials>psa</initials>
<remark><p>Added &lt;paused/&gt; state; defined the chat states; clarified the state chart; simplified the business rules.</p></remark>
</revision>
<revision>
<version>0.5</version>
<date>2003-09-18</date>
<initials>psa</initials>
<remark><p>Clarified that 'type' must be "chat" or "groupchat" for chat state notification messages.</p></remark>
</revision>
<revision>
<version>0.4</version>
<date>2003-05-22</date>
<initials>psa</initials>
<remark><p>Made Thread IDs optional; made &lt;inactive/&gt; and &lt;gone/&gt; states optional if Thread IDs are not used; removed requirement for explicit service discovery in favor of implicit discovery.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2003-05-20</date>
<initials>psa</initials>
<remark><p>Clarified terminology; added support for groupchat; added several implementation notes.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2003-05-19</date>
<initials>psa</initials>
<remark><p>General cleanup; added schema.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-05-19</date>
<initials>dss/psa</initials>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>Many instant messaging systems include notifications about the state of one's conversation partner in a one-to-one chat (or, sometimes, in a many-to-many chat). Usually these are limited to notification that one's partner is currently typing -- e.g., the Composing event in <cite>JEP-0022</cite> (see &jep0022;). However, a composing event is essentially information about a person's participation in or involvement with the chat "session" and therefore is really a session-level state rather than a per-message event -- e.g., the Delivered and Displayed events in <cite>JEP-0022</cite>. While the composing event is interesting, the concept of a session-level state can be extended to answer a variety of questions about the participation of a person in a real-time chat conversation, such as:</p>
<ul>
<li>Has this person paused the composition?</li>
<li>Is this person actively paying attention to the chat?</li>
<li>Is this person temporarily inactive (i.e., not paying attention right now)?</li>
<li>Is this person simply gone (i.e., no longer participating in the chat)?</li>
</ul>
<p>To answer such questions, this JEP supplements the traditional composing state by defining four additional chat states (paused, active, inactive, gone), for a total of five states that (it is hoped) together fully describe the possible states of a person's participation in or involvement with a chat conversation. <note>These states do not necessarily refer to the state of the client interface and certainly not to the disposition of a particular message. However, the user's involvement with the system, device, chat interface, or input interface can provide important clues regarding the user's involvement with the chat session, which should be used by the client in determining when to generate chat state notifications.</note></p>
</section1>
<section1 topic='Definitions' anchor='definitions'>
<p>In essence, chat state notifications can be thought of as a form of chat-specific presence. For example, consider what might happen if a user "loses" a chat window on his desktop; the user might still be interacting with his messaging client (thus never automatically changing his basic presence to "away"), but the user's state with regard to the chat session might change progressively from active to inactive to gone. This information would help the user's conversation partner understand why she has not received a response to her messages in the chat session.</p>
<p>Chat state notifications can appear in two kinds of &MESSAGE; stanzas:</p>
<ul>
<li>A "content message" -- that is, a message stanza that contains standard messaging content such as the &lt;body/&gt;, &lt;subject/&gt;, and &lt;thread/&gt; child elements defined in &xmppim; and/or any other properly-namespaced child element(s).</li>
<li>A "standalone notification" -- that is, a message stanza that does not contain standard messaging content but instead is intended to specify only the chat state since it contains only a child element qualified by the "http://jabber.org/protocol/chatstates" namespace (or possibly also the XMPP &lt;thread/&gt; element; see the <link url='#bizrules-threads'>Threads</link> section below).</li>
</ul>
<p>The five chat states specified in this document are described below. The suggested triggers and state changes are simply that: suggestions. It is up to the implementation to determine when to generate chat state notifications and which notifications to generate.</p>
<table caption='Chat States'>
<tr>
<th>State</th>
<th>Definition</th>
<th>Suggested Triggers</th>
<th>Suggested State Changes</th>
</tr>
<tr>
<td>&lt;active/&gt;</td>
<td>User is actively participating in the chat session.</td>
<td>User accepts an initial content message, sends a content message, gives focus to the chat interface, or is otherwise paying attention to the conversation.</td>
<td>&lt;inactive/&gt;, &lt;composing/&gt;</td>
</tr>
<tr>
<td>&lt;composing/&gt;</td>
<td>User is composing a message.</td>
<td>User is interacting with a message input interface specific to this chat session (e.g., by typing in the input area of a chat window).</td>
<td>&lt;active/&gt;, &lt;paused/&gt;</td>
</tr>
<tr>
<td>&lt;paused/&gt;</td>
<td>User had been composing but now has stopped.</td>
<td>User was composing but has not interacted with the message input interface for a short period of time (e.g., 5 seconds). <note>An implementation may also "guess" that composing has been paused based on a change in the user's interaction with the message input interface, e.g. if the user switches window or application focus.</note></td>
<td>&lt;active/&gt;, &lt;composing/&gt;, &lt;inactive/&gt;</td>
</tr>
<tr>
<td>&lt;inactive/&gt;</td>
<td>User has not been actively participating in the chat session.</td>
<td>User has not interacted with the chat interface for an intermediate period of time (e.g., 30 seconds).</td>
<td>&lt;active/&gt;, &lt;gone/&gt;</td>
</tr>
<tr>
<td>&lt;gone/&gt;</td>
<td>User has effectively ended their participation in the chat session.</td>
<td>User has not interacted with the chat interface, system, or device for a relatively long period of time (e.g., 2 minutes), or has terminated the chat interface (e.g., by closing the chat window).</td>
<td>&lt;active/&gt;</td>
</tr>
</table>
</section1>
<section1 topic='State Chart' anchor='statechart'>
<p>The following figure attempts to capture the possible state transitions in visual form.</p>
<code><![CDATA[
o (start)
|
|
INACTIVE <--> ACTIVE <--> COMPOSING
| ^ |
| | |
+ <------ PAUSED <-----> +
]]></code>
<p>Note: All four of the states shown may transition to the GONE state.</p>
</section1>
<section1 topic='Discovering Support' anchor='disco'>
<p>If an entity supports the Chat State Notifications protocol, it MUST advertise that fact in its responses to &jep0030; information ("diso#info") requests by returning a feature of "http://jabber.org/protocol/chatstates":</p>
<example caption='A disco#info query'><![CDATA[
<iq type='get'
from='romeo@shakespeare.lit/orchard'
to='juliet@capulet.com/balcony'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
<example caption='A disco#info response'><![CDATA[
<iq type='result'
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='http://jabber.org/protocol/chatstates'/>
...
</query>
</iq>
]]></example>
<p>In addition, support for the Chat States Notification protocol can be determined through the dynamic profile of Service Discovery defined in &jep0115;.</p>
</section1>
<section1 topic='Business Rules' anchor='bizrules'>
<section2 topic='Generation of Notifications' anchor='bizrules-gen'>
<p>Before generating chat state notifications, a User SHOULD explicitly discover whether the Contact supports the protocol defined herein (as described in the <link url='#disco'>Discovering Support</link> section of this document) or explicitly negotiate the use of chat state notifications with the Contact (via &jep0155;).</p>
<p>In the absence of explicit discovery or negotiation, the User MAY implicitly request and discover the use of chat state notifications in a one-to-one chat session by adhering to the following business rules:</p>
<ol start='1'>
<li>If the User desires chat state notifications, the initial content message sent to the Contact MUST contain a chat state notification extension, which SHOULD be &lt;active/&gt;.</li>
<li>Until receiving a reply to the initial content message (or a standalone notification) from the Contact, the User MUST NOT send subsequent chat state notifications to the Contact.</li>
<li>If the Contact replies to the initial content message but does not include a chat state notification extension, the User MUST NOT send subsequent chat state notifications to the Contact.</li>
<li>If the Contact replies to the initial content message and includes an &lt;active/&gt; notification (or sends a standalone notification to the User), the User and Contact SHOULD send subsequent notifications for supported chat states (as specified in the next subsection) by including an &lt;active/&gt; notification in each content message and sending standalone notifications for the chat states they support (at a minimum, the &lt;composing/&gt; state).</li>
</ol>
<p>The foregoing rules imply that the sending of chat state notifications is bidirectional (i.e., both User and Contact will either send or not send chat state notifications) rather than unidirectional (i.e., one of the conversation partners will send chat state notifications but the other will not); this is intentional.</p>
</section2>
<section2 topic='Support Requirements' anchor='bizrules-support'>
<table caption='Requirements for Supporting Each Chat State'>
<tr>
<th>Chat State</th>
<th>Requirement</th>
</tr>
<tr>
<td>&lt;active/&gt;</td>
<td>MUST</td>
</tr>
<tr>
<td>&lt;composing/&gt;</td>
<td>MUST</td>
</tr>
<tr>
<td>&lt;paused/&gt;</td>
<td>SHOULD</td>
</tr>
<tr>
<td>&lt;inactive/&gt;</td>
<td>SHOULD</td>
</tr>
<tr>
<td>&lt;gone/&gt;</td>
<td>SHOULD</td>
</tr>
</table>
<p>A client MUST allow the user to configure whether he or she wants to send chat state notifications.</p>
<p>Note: Support for only &lt;active/&gt; and &lt;composing/&gt; is functionally equivalent to supporting the Composing event from <cite>JEP-0022</cite>.</p>
</section2>
<section2 topic='Repetition' anchor='bizrules-rep'>
<p>Even if the user types continuously for a long time (e.g., while composing a lengthy reply), the client MUST NOT send more than one standalone &lt;composing/&gt; notification in a row. More generally, a client MUST NOT send a second instance of any given standalone notification (i.e., a standalone notification MUST be followed by a different state, not repetition of the same state). However, every content message SHOULD contain an &lt;active/&gt; notification.</p>
</section2>
<section2 topic='Context of Usage' anchor='bizrules-context'>
<ol>
<li>This protocol MUST NOT be used with stanzas other than &MESSAGE;.</li>
<li>This protocol SHOULD NOT be used with message types other than "chat" or "groupchat".</li>
<li>The 'type' attribute for content messages and standalone notifications SHOULD be set to a value of "chat" (for one-to-one sessions) or "groupchat" (for many-to-many sessions).</li>
<li>A chat session MAY span multiple user sessions (i.e., chat state is orthogonal to the availability and presence of one's conversation partner), although this is unlikely given the suggested timing of event triggers.</li>
</ol>
</section2>
<section2 topic='Use in Groupchat' anchor='bizrules-groupchat'>
<p>Chat state notifications MAY be sent in the context of groupchat rooms (e.g., as defined in &jep0045;). The following business rules apply:</p>
<ol>
<li>A client MAY send chat state notifications even if not all room occupants do so.</li>
<li>A client SHOULD NOT generate &lt;gone/&gt; notifications.</li>
<li>A client SHOULD ignore &lt;gone/&gt; notifications received from other room occupants.</li>
</ol>
<p>Note: Use of chat state notifications in the context of groupchat may result in multicasting of such notifications. Forewarned is forearmed.</p>
</section2>
<section2 topic='Syntax of Notifications' anchor='bizrules-syntax'>
<ol>
<li>A message stanza MUST NOT contain more than one child element qualified by the 'http://jabber.org/protocol/chatstates' namespace.</li>
<li>A message stanza that contains standard messaging content -- i.e., the &lt;body/&gt;, &lt;subject/&gt;, and &lt;thread/&gt; child elements defined in &xmppim; and/or any other properly-namespaced child element(s) -- SHOULD NOT contain a chat state notification extension other than &lt;active/&gt;.</li>
<li>A message stanza that does not contain standard messaging content and is intended to specify only the chat state MUST NOT contain any child elements other than the chat state notification extension, which SHOULD be a state other than &lt;active/&gt;; however, if threads are used (see below) then the standalone notification MUST also contain the &lt;thread/&gt; element.</li>
</ol>
</section2>
<section2 topic='Threads' anchor='bizrules-threads'>
<p>While chat state notifications provide a mechanism for managing chat threads (i.e., the &lt;thread/&gt; element), support for threads is OPTIONAL. However, if all of the clients participating in a chat both support and use threads, the following additional business rules apply:</p>
<ol>
<li>Clients MUST copy back Thread IDs (i.e., the value of the &lt;thread/&gt; element) in any replies.</li>
<li>When a client terminates a one-to-one chat session (e.g., when a user closes the chat session interface), it MUST generate a &lt;gone/&gt; event.</li>
<li>Upon receiving a &lt;gone/&gt; event, a client MUST NOT re-use the same Thread ID and MUST generate a new Thread ID for any subsequent chat messages sent to the conversation partner.</li>
</ol>
</section2>
<section2 topic='Server Handling of Notifications' anchor='bizrules-notify'>
<p>Servers in constrained network environments (e.g., serving small-footprint clients via &jep0025; or &jep0124;) and services that rebroadcast message stanzas (e.g., Multi-User Chat services) MAY process standalone notifications differently from other messages. In particular, a server or service MAY refuse to deliver standalone notifications to its users, and SHOULD NOT store them offline. In contrast to <cite>JEP-0022</cite>, chat state notifications are completely the responsibility of the client, and MUST NOT be generated by a server or service.</p>
</section2>
</section1>
<section1 topic='A Simple Example' anchor='example-basic'>
<p>In the following conversation, both User and Contact support chat state notifications.</p>
<example caption="User Sends Initial Content Message With &lt;active/&gt; Notification"><![CDATA[
<message
from='bernardo@shakespeare.lit/pda'
to='francisco@shakespeare.lit'
type='chat'>
<body>Who's there?</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<example caption="Contact's Client Sends Content Message Reply With &lt;active/&gt; Notification"><![CDATA[
<message
from='francisco@shakespeare.lit/elsinore'
to='bernardo@shakespeare.lit/pda'
type='chat'>
<body>Nay, answer me: stand, and unfold yourself.</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>Because the User now knows that the Contact supports chat state notifications, the User can send other notification types.</p>
<example caption="User Sends Standalone &lt;composing/&gt; Notification"><![CDATA[
<message
from='bernardo@shakespeare.lit/pda'
to='francisco@shakespeare.lit/elsinore'
type='chat'>
<composing xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<example caption="User Sends a Content Message Reply With &lt;active/&gt; Notification"><![CDATA[
<message
from='bernardo@shakespeare.lit/pda'
to='francisco@shakespeare.lit/elsinore'
type='chat'>
<body>Long live the king!</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>And so forth.</p>
</section1>
<section1 topic='A Detailed Conversation' anchor='example-detail'>
<p>The following conversation flow illustrates in more detail the workings of chat state notifications (in this case also using threads).</p>
<example caption="User Sends Initial Content Message"><![CDATA[
<message
from='romeo@shakespeare.lit/orchard'
to='juliet@capulet.com'
type='chat'>
<thread>act2scene2chat1</thread>
<body>
I take thee at thy word:
Call me but love, and I'll be new baptized;
Henceforth I never will be Romeo.
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>At this point Juliet's client knows that Romeo's client supports chat state notifications. Thus she replies to the initial content message and her client includes a notification that her state is &lt;active/&gt;:</p>
<example caption="Contact's Client Sends Content Message Reply With &lt;active/&gt; Notification"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<body>
What man art thou that thus bescreen'd in night
So stumblest on my counsel?
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>And so the conversation continues. After a while, Juliet asks a question that brings Romeo up short. Romeo begins composing a reply to Juliet's heartfelt question, and his Jabber client notifies Juliet that he is composing a reply.</p>
<example caption="User's Client Sends Standalone &lt;composing/&gt; Notification"><![CDATA[
<message
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
type='chat'>
<thread>act2scene2chat1</thread>
<composing xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>Romeo realizes his reply is too rash and pauses to choose the right words; after some (configurable) time period, his Jabber client senses the delay and sends a state of &lt;paused/&gt;.</p>
<example caption="User's Client Sends Standalone &lt;paused/&gt; Notification"><![CDATA[
<message
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
type='chat'>
<thread>act2scene2chat1</thread>
<paused xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>Romeo starts composing again, and his Jabber client sends a &lt;composing/&gt; notification to Juliet's client.</p>
<example caption="User's Clients Sends Standalone &lt;composing/&gt; Notification"><![CDATA[
<message
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
type='chat'>
<thread>act2scene2chat1</thread>
<composing xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>Romeo finally sends his reply.</p>
<example caption="User Replies"><![CDATA[
<message
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
type='chat'>
<thread>act2scene2chat1</thread>
<body>Neither, fair saint, if either thee dislike.</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>The conversation ebbs and flows, waxes and wanes, until Juliet is called away by her Nurse...</p>
<example caption="Contact's Client Sends Content Message"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<body>
I hear some noise within; dear love, adieu!
Anon, good nurse! Sweet Montague, be true.
Stay but a little, I will come again.
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>We suppose that Juliet minimizes the chat window, so her client generates an &lt;inactive/&gt; notification:</p>
<example caption="Contact's Client Sends Standalone &lt;inactive/&gt; Notification"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<inactive xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>When she returns and brings the window up again, her client generates an &lt;active/&gt; notification:</p>
<example caption="Contact's Client Sends Standalone &lt;active/&gt; Notification"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>The conversation continues, but Juliet is called away again by that nagging Nurse:</p>
<example caption="Contact's Client Sends Content Message"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<body>
A thousand times good night!
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>We suppose that Juliet closes the chat window, so her client generates a &lt;gone/&gt; notification:</p>
<example caption="Contact's Client Sends Standalone &lt;gone/&gt; Notification"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat1</thread>
<gone xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>Romeo's client now considers the chat thread to be over and generates a new Thread ID when he sends a new message:</p>
<example caption="User's Client Sends Content Message with New Thread ID"><![CDATA[
<message
from='romeo@shakespeare.lit/orchard'
to='juliet@capulet.com/balcony'
type='chat'>
<thread>act2scene2chat2</thread>
<body>
A thousand times the worse, to want thy light.
Love goes toward love, as schoolboys from their books,
But love from love, toward school with heavy looks.
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>When Juliet returns to her computer on the balcony, she finds the new message from Romeo. When she finishes her reply, her client includes both an &lt;active/&gt; notification and the new Thread ID with the body of her reply:</p>
<example caption="Contact's Client Sends Content Message"><![CDATA[
<message
from='juliet@capulet.com/balcony'
to='romeo@shakespeare.lit/orchard'
type='chat'>
<thread>act2scene2chat2</thread>
<body>
Hist! Romeo, hist! O, for a falconer's voice,....
</body>
<active xmlns='http://jabber.org/protocol/chatstates'/>
</message>
]]></example>
<p>And so forth.</p>
<p>My, these star-crossed lovers do go on, don't they?</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>A client that receives a chat state notification should expect that it may never receive another message or chat state notification from the other entity (e.g., because the other entity crashes or goes offline) and should plan accordingly.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>The states of a chat thread may reveal information about a user's interaction with his or her computer, including his or her physical presence; such information SHOULD NOT be revealed to conversation partners who are not trusted to know such information. Client implementations MUST provide a mechanism that enables the user to disable chat state notifications if desired.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This JEP requires no interaction with &IANA;.</p>
</section1>
<section1 topic='Jabber Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; includes 'http://jabber.org/protocol/chatstates' in its registry of protocol namespaces.</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/chatstates'
xmlns='http://jabber.org/protocol/chatstates'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
JEP-0085: http://www.jabber.org/jeps/jep-0085.html
</xs:documentation>
</xs:annotation>
<xs:element name='active' type='empty'/>
<xs:element name='composing' type='empty'/>
<xs:element name='gone' type='empty'/>
<xs:element name='inactive' type='empty'/>
<xs:element name='paused' type='empty'/>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
]]></code>
</section1>
</jep>