mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-25 18:52:23 -05:00
0.4
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1200 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
e9bbd312d9
commit
01d6a9ba9e
44
xep-0201.xml
44
xep-0201.xml
@ -23,6 +23,12 @@
|
|||||||
&stpeter;
|
&stpeter;
|
||||||
&ianpaterson;
|
&ianpaterson;
|
||||||
&ksmith;
|
&ksmith;
|
||||||
|
<revision>
|
||||||
|
<version>0.4</version>
|
||||||
|
<date>2007-08-30</date>
|
||||||
|
<initials>psa</initials>
|
||||||
|
<remark><p>Specified handling of thread IDs on groupchat messages.</p></remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.3</version>
|
<version>0.3</version>
|
||||||
<date>2007-01-29</date>
|
<date>2007-01-29</date>
|
||||||
@ -70,8 +76,8 @@
|
|||||||
<section1 topic='Semantics' anchor='semantics'>
|
<section1 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>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.</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.</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 proposal the following description:</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 proposal 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.</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>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Uniqueness' anchor='unique'>
|
<section1 topic='Uniqueness' anchor='unique'>
|
||||||
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following uniqueness requirement:</p>
|
<p>Section 2.1.2.3 of <cite>RFC 3921</cite> currently states the following uniqueness requirement:</p>
|
||||||
@ -80,16 +86,28 @@
|
|||||||
<p class='indent'>The value of the <thread/> element MUST be a universally unique identifier (UUID). The format described in &rfc4122; is RECOMMENDED.</p>
|
<p class='indent'>The value of the <thread/> element MUST be a universally unique identifier (UUID). The format described in &rfc4122; is RECOMMENDED.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Handling' anchor='handling'>
|
<section1 topic='Handling' anchor='handling'>
|
||||||
<p>In the context of <message/> stanzas of type 'chat' exchanged between two entities, the value of the <thread/> 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>
|
<section2 topic='Chat Messages' anchor='chat'>
|
||||||
<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; instead, 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>In the context of <message/> stanzas of type "chat" exchanged between two entities, the value of the <thread/> 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>When sending a <message/> stanza of type 'normal', the value of the <thread/> element is used to uniquely identify a conversation thread which 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>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; instead, it SHOULD assume that the other entity will still be able to continue the session (perhaps the other entity simply became "invisible", was temporarily disconnected by a network error, or is persisting the state of the session until it reconnects and receives "offline" messages).</p>
|
||||||
<p>There are no special handling requirements related to threads in the context of <message/> stanzas of type 'headline'.</p>
|
<p>If an entity receives a message of type "chat" without a thread ID then:</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>
|
<ul>
|
||||||
<p>If an entity receives a message of type 'chat' without a thread ID then:</p>
|
<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>
|
||||||
<ul>
|
<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>
|
||||||
<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>
|
</ul>
|
||||||
<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>
|
</section2>
|
||||||
</ul>
|
<section2 topic='Groupchat Messages' anchor='groupchat'>
|
||||||
|
<p>In the context of <message/> stanzas of type "groupchat" exchanged between multiple entities in a &xep0045; room or similar environment, the value of the <thread/> element shall be considered equivalent to a unique identifier for a conversation thread in the multi-user environment.</p>
|
||||||
|
<p>When displaying threaded groupchat conversation 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 topic='Headline Messages' anchor='headline'>
|
||||||
|
<p>There are no special handling requirements related to threads in the context of <message/> stanzas of type "headline".</p>
|
||||||
|
</section2>
|
||||||
|
<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 which 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>
|
||||||
|
</section2>
|
||||||
|
<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>
|
||||||
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Inclusion' anchor='inclusion'>
|
<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>
|
<p>Depending on the type of the message (i.e., the value of the 'type' attribute), the <thread/> should be included as follows:</p>
|
||||||
@ -146,7 +164,7 @@
|
|||||||
<thread>e0ffe42b28561960c6b12b944a092794b9683a38</thread>
|
<thread>e0ffe42b28561960c6b12b944a092794b9683a38</thread>
|
||||||
</message>
|
</message>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>The entity that replies then MAY include an "In-Reply-To" header:</p>
|
<p>The entity that replies then MAY include an "In-Reply-To" SHIM header:</p>
|
||||||
<example caption='Reply'><![CDATA[
|
<example caption='Reply'><![CDATA[
|
||||||
<message
|
<message
|
||||||
to='juliet@example.com/balcony'
|
to='juliet@example.com/balcony'
|
||||||
|
Loading…
Reference in New Issue
Block a user