0.3 RC1 handling of unavail presence and messages without thread IDs etc.

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@432 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Ian Paterson 2007-01-28 16:58:30 +00:00
parent c091b4c77d
commit fd8b098fd8
1 changed files with 19 additions and 8 deletions

View File

@ -23,6 +23,12 @@
&stpeter;
&ianpaterson;
&ksmith;
<revision>
<version>0.3</version>
<date>2007-01-29</date>
<initials>ip</initials>
<remark><p>Described handling of unavailable presence and 'chat' messages without thread IDs; minor changes</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2007-01-23</date>
@ -71,14 +77,19 @@
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following uniqueness requirement:</p>
<p class='indent'>The value of the &lt;thread/&gt; element ... MUST be unique to that conversation thread within the stream and MUST be consistent throughout that conversation (a client that receives a message from the same full JID but with a different thread ID MUST assume that the message in question exists outside the context of the existing conversation thread).</p>
<p>The uniqueness requirement in <cite>RFC 3921</cite> is not deemed strong enough since it is desirable that a ThreadID could be used to (for instance) restart a conversation at a later date. Therefore we propose the following uniqueness requirement:</p>
<p class='indent'>The value of the &lt;thread/&gt; element MUST be a universally unique identifier (UUID) as described in &rfc4122;.</p>
<p class='indent'>The value of the &lt;thread/&gt; element MUST be a universally unique identifier (UUID). The format described in &rfc4122; is RECOMMENDED.</p>
</section1>
<section1 topic='Handling' anchor='handling'>
<p>In the context of &lt;message/&gt; stanzas of type 'chat' exchanged between two entities, the value of the &lt;thread/&gt; element shall be considered equivalent to a unique identifier for the chat session or conversation thread. If an entity receives such a message with a new or unknown ThreadID, it SHOULD treat the message as part of a session with unnegotiated parameters (i.e., as equivalent to the first message in a chat session that has been negotiated via <cite>XEP-0155</cite> with no parameters specified). An entity SHOULD destroy the thread when it sends or receives a <cite>XEP-0155</cite> "terminate" action and MAY destroy the thread when it goes offline, but SHOULD NOT destroy the thread if a human user merely closes a window in a client interface.</p>
<p>In the context of &lt;message/&gt; stanzas of type 'chat' exchanged between two entities, the value of the &lt;thread/&gt; element shall be considered equivalent to a unique identifier for the chat session or conversation thread. If an entity receives such a message with a new or unknown ThreadID, it SHOULD treat the message as part of a session with unnegotiated parameters (i.e., as equivalent to the first message in a chat session that has been negotiated via <cite>XEP-0155</cite> with no parameters specified). An entity SHOULD destroy the thread when it sends or receives a <cite>XEP-0155</cite> "terminate" stanza (such a stanza SHOULD be sent even for sessions that were not negotitated with <cite>XEP-0155</cite>) and MAY destroy the thread when it goes offline, but SHOULD NOT destroy the thread if a human user merely closes a window in a client interface.</p>
<p>If an entity receives an XMPP presence stanza of type 'unavailable' from the other entity during a chat session, it SHOULD NOT destroy the thread, it SHOULD assume the other entity will still be able to continue the session (perhaps the other entity simply became "invisible", or was temporarily disconnected by a network error, or it is persisting the state of the session until it reconnects and receives "offline" messages).</p>
<p>When sending a &lt;message/&gt; stanza of type 'normal', the value of the &lt;thread/&gt; element is used to uniquely identify a conversation thread which may not be progressing in real-time. A &lt;message/&gt; stanza of type 'normal' SHOULD always use a new &lt;thread/&gt; element identifier unless it is written in direct reply to another &lt;message/&gt; stanza, in which case the &lt;thread/&gt; element of the original &lt;message/&gt; should be used. Determining what constitutes a &lt;message/&gt; stanza written in reply to another is a matter left to individual implementation, but it is envisaged that in most cases it would be the result of, e.g., the user clicking a 'reply' button when reading the contents of the previous stanza; alternatively, the entity that replies can include an "In-Reply-To" header as described in the <link url='#impl'>Implementation Notes</link> section of this document.</p>
<p>To ensure the uniqueness of ThreadIDs in the context of a multi-user chat room, the multi-use chat service MAY provide a way for room occupants to request a unique ThreadID; definition of such methods is out of scope for this specification.</p>
<p>There are no special handling requirements related to threads in the context of &lt;message/&gt; stanzas of type 'headline'.</p>
<p>When displaying historical conversations within a user interface, a client SHOULD provide a visual indication of thread membership of messages. Methods for such indications include (non-exhaustively) the grouping of all messages within a thread together, providing an index of threads, or formatting all messages within a thread in a cohesive manner, e.g. with a uniform coloring.</p>
<p>If an entity receives a message of type 'chat' without a thread ID then:</p>
<ul>
<li>If the receiving entity has no sessions open with the message sender (full JID), or if all the open sessions have already <em>received</em> a message that included the session's thread ID, then the receiver should create a new session with a new thread ID (and include that thread ID in all the messages it sends within the session).</li>
<li>If the receiver has a session open with the sender within which it has never received any message that included the session's thread ID, then it should consider the message to be part of that session. If more than one of such sessions exist, then the message should be considered part of the session in which the receiver last sent a message.</li>
</ul>
</section1>
<section1 topic='Inclusion' anchor='inclusion'>
<p>Depending on the type of the message (i.e., the value of the 'type' attribute), the &lt;thread/&gt; should be included as follows:</p>
@ -89,11 +100,11 @@
</tr>
<tr>
<td>chat</td>
<td>RECOMMENDED</td>
<td>SHOULD</td>
</tr>
<tr>
<td>groupchat</td>
<td>OPTIONAL</td>
<td>RECOMMENDED</td>
</tr>
<tr>
<td>headline</td>
@ -112,7 +123,7 @@
to='joogle@botster.shakespeare.lit'
type='get'
id='create1'>
<command xmlns='http://jabber.org/protocol/commands'
<command xmlns='http://jabber.org/protocol/commands'
node='create'
action='execute'>
<headers xmlns='http://jabber.org/protocol/shim'>
@ -152,7 +163,7 @@
]]></example>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>An entity that generates the UUID used as the ThreadID MUST ensure that the UUID does not reveal personally-identifying information about the entity.</p>
<p>An entity that generates the UUID used as the ThreadID MUST ensure that the UUID does not reveal (identifying) information about the entity.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
@ -164,7 +175,7 @@
<header>
<name>ThreadID</name>
<desc>
This header has the same semantics as the thread child element
This header has the same semantics as the thread child element
of the XMPP message stanza but is for use in IQ stanzas.
</desc>
<doc>XEP-0201</doc>