mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-27 19:52:18 -05:00
0.5
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1656 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
3672e922c9
commit
fc9a07b243
112
xep-0201.xml
112
xep-0201.xml
@ -23,6 +23,12 @@
|
|||||||
&stpeter;
|
&stpeter;
|
||||||
&ianpaterson;
|
&ianpaterson;
|
||||||
&ksmith;
|
&ksmith;
|
||||||
|
<revision>
|
||||||
|
<version>0.5</version>
|
||||||
|
<date>2008-02-06</date>
|
||||||
|
<initials>psa</initials>
|
||||||
|
<remark><p>Defined parent attribute and provided recommendations regarding creation of new threads and child threads.</p></remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.4</version>
|
<version>0.4</version>
|
||||||
<date>2007-08-30</date>
|
<date>2007-08-30</date>
|
||||||
@ -73,17 +79,74 @@
|
|||||||
<li>Route XMPP stanzas within a client (e.g., dispatching different content types to different windows), thus facilitating the creation of more robust plugin architectures.</li>
|
<li>Route XMPP stanzas within a client (e.g., dispatching different content types to different windows), thus facilitating the creation of more robust plugin architectures.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Semantics' anchor='semantics'>
|
<section1 topic='Definition' anchor='def'>
|
||||||
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following regarding the semantics of the ThreadID:</p>
|
<section2 topic='Syntax' anchor='syntax'>
|
||||||
<p class='indent'>The <thread/> element contains non-human-readable XML character data specifying an identifier that is used for tracking a conversation thread (sometimes referred to as an "instant messaging session") between two entities.</p>
|
<p>Section 2.1.2.3 of <cite>RFC 3920</cite> currently states the following regarding the syntax of the ThreadID:</p>
|
||||||
<p>The description in <cite>RFC 3921</cite> is deemed to be too limiting, since it ignores the potential use of the ThreadID when exchanging message stanzas of types other than "chat". Therefore we propose the following description:</p>
|
<p class='indent'>A message stanza MUST NOT contain more than one <thread/> element. The <thread/> element MUST NOT possess any attributes.... The <thread/> element MUST NOT contain mixed content (as defined in Section 3.2.2 of XML).</p>
|
||||||
<p class='indent'>The primary use of the XMPP <thread/> element is to uniquely identify a conversation thread or "chat session" between two entities instantiated by <message/> stanzas of type "chat". However, the XMPP <thread/> element may also be used to uniquely identify an analogous thread between two entities instantiated by <message/> stanzas of type "headline" or "normal", or among multiple entities in the context of a multi-user chat room instantiated by <message/> stanzas of type "groupchat". It may also be used for <message/> stanzas not related to a conversation, such as a game session or between plugins.</p>
|
<p>For the purpose of improved thread handling, we propose defining a 'parent' attribute that enables an application to identify the current thread as an offshoot or child of a previous thread. Therefore we suggest the following syntax definition:</p>
|
||||||
|
<p class='indent'>The inclusion of the <thread/> element is OPTIONAL. Because the <thread/> element uniquely identifies the particular conversation thread to which a message belongs, a message stanza MUST NOT contain more than one <thread/> element.</p>
|
||||||
|
<p class='indent'>The <thread/> element MAY possess a 'parent' attribute that identifies another thread of which the current thread is an offshoot or child; the value of the 'parent' MUST conform to the syntax of the <thread/> element itself. The <thread/> element MUST NOT contain mixed content (as defined in Section 3.2.2 of <xref target="XML"/>).</p>
|
||||||
|
</section2>
|
||||||
|
<section2 topic='Semantics' anchor='semantics'>
|
||||||
|
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following regarding the semantics of the ThreadID:</p>
|
||||||
|
<p class='indent'>The <thread/> element contains non-human-readable XML character data specifying an identifier that is used for tracking a conversation thread (sometimes referred to as an "instant messaging session") between two entities.... The value of the <thread/> element MUST be treated as opaque by entities; no semantic meaning may be derived from it, and only exact comparisons may be made against it.</p>
|
||||||
|
<p>The description in <cite>RFC 3921</cite> is deemed to be too limiting, since it ignores the potential use of the ThreadID when exchanging message stanzas of types other than "chat". Therefore we propose the following description:</p>
|
||||||
|
<p class='indent'>The primary use of the XMPP <thread/> element is to uniquely identify a conversation thread or "chat session" between two entities instantiated by <message/> stanzas of type 'chat'. However, the XMPP <thread/> element may also be used to uniquely identify an analogous thread between two entities instantiated by <message/> stanzas of type 'headline' or 'normal', or among multiple entities in the context of a multi-user chat room instantiated by <message/> stanzas of type 'groupchat'. It may also be used for <message/> stanzas not related to a conversation, such as a game session or between plugins. The <thread/> element is not used to identify individual messages, only conversations.</p>
|
||||||
|
</section2>
|
||||||
|
<section2 topic='Uniqueness' anchor='unique'>
|
||||||
|
<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 <thread/> 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 <thread/> element is not human-readable and MUST be treated as opaque by entities; no semantic meaning may be derived from it, and only exact comparisons may be made against it. The value of the <thread/> element MUST be a universally unique identifier (UUID) as described in <xref target='UUID'/>.</p>
|
||||||
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Uniqueness' anchor='unique'>
|
<section1 topic='Generation' anchor='generation'>
|
||||||
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following uniqueness requirement:</p>
|
<section2 topic='Inclusion' anchor='inclusion'>
|
||||||
<p class='indent'>The value of the <thread/> 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>Depending on the type of the message (i.e., the value of the 'type' attribute), the <thread/> should be included as follows:</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>
|
<table caption='When to Include Threads'>
|
||||||
<p class='indent'>The value of the <thread/> element MUST be a universally unique identifier (UUID). The format described in &rfc4122; is RECOMMENDED.</p>
|
<tr>
|
||||||
|
<th>Message Type</th>
|
||||||
|
<th>Inclusion</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>chat</td>
|
||||||
|
<td>RECOMMENDED</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>groupchat</td>
|
||||||
|
<td>RECOMMENDED</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>headline</td>
|
||||||
|
<td>OPTIONAL</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>normal</td>
|
||||||
|
<td>OPTIONAL</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section2>
|
||||||
|
<section2 topic='New Threads' anchor='new'>
|
||||||
|
<p>Unless a <message/> stanza is written in direct reply to another <message/> stanza, if a ThreadID is included then its value SHOULD be newly generated if a a human user initiates a chat conversation with another user (i.e., a <message/> stanza of type 'chat'), starts a new conversation in the context of a multi-user chat environment (i.e., a <message/> stanza of type 'groupchat'), or sends a normal message.</p>
|
||||||
|
<p>If the <message/> stanza is written in directly reply to another <message/> stanza, then the ThreadID should be the value from the the original <message/> stanza.</p>
|
||||||
|
<p>Determining what constitutes a <message/> 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>
|
||||||
|
</section2>
|
||||||
|
<section2 topic='Child Threads' anchor='child'>
|
||||||
|
<p>In some situations, the conversation veers from the original topic. In this situation, it can be sensible to generate a new thread that is an offshoot or child of the original thread. The connection of the child thread to the parent thread SHOULD be indicated by including the original ThreadID as the value of the 'parent' attribute.</p>
|
||||||
|
<example caption='Message with ID'><![CDATA[
|
||||||
|
<message
|
||||||
|
to='romeo@example.net/orchard'
|
||||||
|
from='juliet@example.com/balcony'
|
||||||
|
id='asiwe8289ljfdalk'
|
||||||
|
type='chat'
|
||||||
|
xml:lang='en'>
|
||||||
|
<body>Art thou not Romeo, and a Montague?</body>
|
||||||
|
<thread parent='7edac73ab41e45c4aafa7b2d7b749080'>
|
||||||
|
e0ffe42b28561960c6b12b944a092794b9683a38
|
||||||
|
</thread>
|
||||||
|
</message>
|
||||||
|
]]></example>
|
||||||
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Handling' anchor='handling'>
|
<section1 topic='Handling' anchor='handling'>
|
||||||
<section2 topic='Chat Messages' anchor='chat'>
|
<section2 topic='Chat Messages' anchor='chat'>
|
||||||
@ -103,37 +166,12 @@
|
|||||||
<p>There are no special handling requirements related to threads in the context of <message/> stanzas of type "headline".</p>
|
<p>There are no special handling requirements related to threads in the context of <message/> stanzas of type "headline".</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Normal Messages' anchor='normal'>
|
<section2 topic='Normal Messages' anchor='normal'>
|
||||||
<p>When sending a <message/> stanza of type "normal", the value of the <thread/> element is used to uniquely identify a conversation thread that may not be progressing in real-time. A <message/> stanza of type "normal" SHOULD always use a new <thread/> element identifier unless it is written in direct reply to another <message/> stanza, in which case the <thread/> element of the original <message/> should be used. Determining what constitutes a <message/> 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>There are no special handling requirements related to threads in the context of <message/> stanzas of type "headline".</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Messages That Have Been Archived' anchor='archived'>
|
<section2 topic='Messages That Have Been Archived' anchor='archived'>
|
||||||
<p>When displaying historical conversations within a user interface, a client SHOULD provide a visual indication of the thread to which a message belongs. Methods for such indications include (non-exhaustively) the grouping together of all messages from the same thread, providing an index of threads, or formatting all messages within a thread in a cohesive manner, e.g. with uniform coloring.</p>
|
<p>When displaying historical conversations within a user interface, a client SHOULD provide a visual indication of the thread to which a message belongs. Methods for such indications include (non-exhaustively) the grouping together of all messages from the same thread, providing an index of threads, or formatting all messages within a thread in a cohesive manner, e.g. with uniform coloring.</p>
|
||||||
</section2>
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Inclusion' anchor='inclusion'>
|
|
||||||
<p>Depending on the type of the message (i.e., the value of the 'type' attribute), the <thread/> should be included as follows:</p>
|
|
||||||
<table caption='When to Include Threads'>
|
|
||||||
<tr>
|
|
||||||
<th>Message Type</th>
|
|
||||||
<th>Inclusion</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>chat</td>
|
|
||||||
<td>RECOMMENDED</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>groupchat</td>
|
|
||||||
<td>RECOMMENDED</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>headline</td>
|
|
||||||
<td>OPTIONAL</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>normal</td>
|
|
||||||
<td>OPTIONAL</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</section1>
|
|
||||||
<section1 topic='SHIM Header' anchor='shim'>
|
<section1 topic='SHIM Header' anchor='shim'>
|
||||||
<p>In some contexts it may be desirable to enforce thread-like semantics when exchanging XMPP <iq/> stanzas. Because <cite>RFC 3920</cite> disallows more than one direct child element of the <iq/> stanza, it is not possible to include the <thread/> element for tracking purposes. Therefore we define a "ThreadID" &xep0131; header with the same semantics as the <thread/> element, but with the syntax of a SHIM header:</p>
|
<p>In some contexts it may be desirable to enforce thread-like semantics when exchanging XMPP <iq/> stanzas. Because <cite>RFC 3920</cite> disallows more than one direct child element of the <iq/> stanza, it is not possible to include the <thread/> element for tracking purposes. Therefore we define a "ThreadID" &xep0131; header with the same semantics as the <thread/> element, but with the syntax of a SHIM header:</p>
|
||||||
<example caption='ThreadID header'><![CDATA[
|
<example caption='ThreadID header'><![CDATA[
|
||||||
@ -181,7 +219,7 @@
|
|||||||
]]></example>
|
]]></example>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Security Considerations' anchor='security'>
|
<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 identifying information about the entity.</p>
|
<p>An application that generates the UUID used as the ThreadID MUST ensure that the UUID does not reveal identifying information about the entity (e.g., the MAC address of the device on which the XMPP application is running).</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='IANA Considerations' anchor='iana'>
|
<section1 topic='IANA Considerations' anchor='iana'>
|
||||||
<p>This document requires no interaction with &IANA;.</p>
|
<p>This document requires no interaction with &IANA;.</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user