mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
1.1rc3
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4075 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
c8aca67bc7
commit
b22183cdba
164
xep-0184.xml
164
xep-0184.xml
@ -29,10 +29,10 @@
|
||||
&stpeter;
|
||||
&hildjj;
|
||||
<revision>
|
||||
<version>1.1rc2</version>
|
||||
<date>in progress, last updated 2010-02-26</date>
|
||||
<version>1.1rc3</version>
|
||||
<date>in progress, last updated 2010-03-12</date>
|
||||
<initials>psa</initials>
|
||||
<remark><p>Relaxed the business rules to allow inclusion of receipt requests even to the bare JID and even if the sender does not yet know whether the intended recipient supports this protocol; clarified the level of reliability that this protocol does and does not provide.</p></remark>
|
||||
<remark><p>Relaxed the business rules to allow inclusion of receipt requests even to the bare JID and even if the sender does not yet know whether the intended recipient supports this protocol; clarified the level of reliability that this protocol does and does not provide; provided explicit recommendations about when and when not to request receipts; removed text about XEP-0155 negotiation.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>1.0</version>
|
||||
@ -77,10 +77,12 @@
|
||||
<remark><p>First draft.</p></remark>
|
||||
</revision>
|
||||
</header>
|
||||
|
||||
<section1 topic='Introduction' anchor='intro'>
|
||||
<p>While &xep0079; provides message acknowledgements at the server level, it does not extend that model all the way to the client. However, sometimes client-level acknowledgements are needed, for example to provide "receipts". This document defines a mechanism for XMPP message receipts, which are functionally equivalent to the "delivered" or "displayed" event in &xep0022;, which this specification in part obsoletes. <note>This specification does not distinguish between delivery and presentation, as was done in the message events protocol, in part because no existing clients make the distinction.</note></p>
|
||||
<p>Note: This extension is functionally equivalent to an <cite>Advanced Message Processing</cite> rule of "receipt" but uses a dedicated namespace to simplify processing by end user clients and intermediate routers.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Requirements' anchor='reqs'>
|
||||
<p>This document addresses the following requirements:</p>
|
||||
<ol>
|
||||
@ -88,55 +90,23 @@
|
||||
<li>Enable a recipient to provide message receipts if desired.</li>
|
||||
</ol>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Reliability' anchor='reliability'>
|
||||
<p>This document defines a protocol that enables a sender to ask the recipient to return a receipt for a message. Although the return of a message receipt lets the sender know that the message has been delivered, there are many reasons why the sender might not receive a receipt immediately or at all, including but not limited to the following:</p>
|
||||
<ul>
|
||||
<li>The sender addressed the message to the recipient's bare JID &LOCALBARE; and therefore does not know if the recipient even supports message receipts.</li>
|
||||
<li>The sender has not bothered to determine whether the recipient supports message receipts.</li>
|
||||
<li>The recipient (or the particular intended resource to which the sender addressed the message) does not in fact support message receipts.</li>
|
||||
<li>The intended resource supports message receipts but the recipient's server delivers the message to another resource that does not support message receipts.</li>
|
||||
<li>The recipient's client receives the message but experiences a malfunction before generating a receipt.</li>
|
||||
<li>The recipient returns a receipt but the receipt is lost on the way back from the recipient to the sender (e.g., because of connectivity issues or software failures at any hop).</li>
|
||||
</ul>
|
||||
<p>Therefore this document does not define a protocol for complete reliability or guaranteed delivery, and those who implement and deploy this protocol need to be aware of its limitations.</p>
|
||||
</section1>
|
||||
<section1 topic='Protocol Format' anchor='format'>
|
||||
<p>In order to make it possible for senders to request and for recipients to generate message receipts, we define a dedicated protocol extension qualified by the 'urn:xmpp:receipts' namespace.</p>
|
||||
<p>There are two allowable elements in this namespace:</p>
|
||||
<ul>
|
||||
<li><request/> -- included by a sending entity that wishes to know if the message has been received.</li>
|
||||
<li><received/> -- included by a receiving entity that wishes to inform the sending entity that the message has been received.</li>
|
||||
</ul>
|
||||
<p>Specifically, the receiving entity shall return a <received/> notice if it has received and processed the message. The term "processed" is understood to include presentation to a human user if appropriate or any other application-specific client-side processing, including generation of an error response if the application determines that the message contents cannot be handled.</p>
|
||||
<p>The following is an example of a message that includes a request for return receipt.</p>
|
||||
<example caption='A message with receipt requested'><![CDATA[
|
||||
<message
|
||||
from='northumberland@shakespeare.lit/westminster'
|
||||
id='richard2-4.1.247'
|
||||
to='kingrichard@royalty.england.lit/throne'>
|
||||
<body>My lord, dispatch; read o'er these articles.</body>
|
||||
<request xmlns='urn:xmpp:receipts'/>
|
||||
</message>
|
||||
]]></example>
|
||||
<p>The recipient shall generate a receipt if and only if it supports the protocol defined herein and it is configured to return receipts, either globally or for this recipient (otherwise it MUST NOT return a receipt and SHOULD NOT return an error).</p>
|
||||
<example caption='A message receipt'><![CDATA[
|
||||
<message
|
||||
from='kingrichard@royalty.england.lit/throne'
|
||||
id='richard2-4.1.247'
|
||||
to='northumberland@shakespeare.lit/westminster'>
|
||||
<received xmlns='urn:xmpp:receipts'/>
|
||||
</message>
|
||||
]]></example>
|
||||
<p>The <received/> element SHOULD be the only child of the &MESSAGE; stanza and MUST mirror the 'id' of the sent message.</p>
|
||||
</section1>
|
||||
<section1 topic='Business Rules' anchor='rules'>
|
||||
<p>The following business rules apply:</p>
|
||||
<ol start='1'>
|
||||
<li><p>If receipts are desired, a sender SHOULD include a request for message receipts on all messages, no matter whether sending to the bare JID &LOCALBARE; of the recipient or the full JID &LOCALFULL;.</p></li>
|
||||
<li><p>A sender MUST include an 'id' attribute on the message so that the sender can properly track the receipt.</p></li>
|
||||
</ol>
|
||||
<p>Naturally, message receipts can be combined with the rules specified in <cite>Advanced Message Processing</cite> (e.g., the deliver rule) for more complete reporting.</p>
|
||||
<p>As a result, this document does not define a protocol for complete reliability or guaranteed delivery, and those who implement and deploy this protocol need to be aware of its limitations, as described throughout this specification.</p>
|
||||
<p>Note: Message receipts can be combined with the rules specified in <cite>Advanced Message Processing</cite> (e.g., the deliver rule) for more complete reporting.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Determining Support' anchor='disco'>
|
||||
<p>If an entity supports message receipts, it MUST report that by including a service discovery feature of "urn:xmpp:receipts" in response to disco#info requests:</p>
|
||||
<p>If an entity supports message receipts, it MUST report that by including a &xep0030; feature of "urn:xmpp:receipts" in response to disco#info requests:</p>
|
||||
<example caption="Initial Service Discovery information request"><![CDATA[
|
||||
<iq from='northumberland@shakespeare.lit/westminster'
|
||||
id='disco1'
|
||||
@ -155,84 +125,67 @@
|
||||
</query>
|
||||
</iq>
|
||||
]]></example>
|
||||
<p>A sender MAY include a request for message receipts even if it has not been able to determine if the intended recipient supports message receipts. This can be done directly via <cite>Service Discovery</cite> or indirectly via <cite>Entity Capabilities</cite>.</p>
|
||||
<p>Support can also be determined via &xep0115; a.k.a. "caps".</p>
|
||||
</section1>
|
||||
<section1 topic='Negotiation' anchor='neg'>
|
||||
<p>Two entities MAY negotiate the use of message receipts for a given session using <cite>Stanza Session Negotiation</cite>. The parameter to be negotiated is named "urn:xmpp:receipts". Its use is illustrated in the following examples.</p>
|
||||
<example caption="User requests chat session"><![CDATA[
|
||||
<message type='normal'
|
||||
from='northumberland@shakespeare.lit/westminster'
|
||||
to='kingrichard@royalty.england.lit/throne'
|
||||
id='init1'>
|
||||
<thread>ffd7076498744578d10edabfe7f4a866</thread>
|
||||
<feature xmlns='http://jabber.org/protocol/feature-neg'>
|
||||
<x xmlns='jabber:x:data' type='form'>
|
||||
<field var='FORM_TYPE' type='hidden'>
|
||||
<value>urn:xmpp:ssn</value>
|
||||
</field>
|
||||
<field label='Accept this chat?'
|
||||
type='boolean'
|
||||
var='accept'>
|
||||
<value>true</value>
|
||||
<required/>
|
||||
</field>
|
||||
<field label='Enable Message Receipts?'
|
||||
type='boolean'
|
||||
var='urn:xmpp:receipts'>
|
||||
<value>0</value>
|
||||
</field>
|
||||
</x>
|
||||
</feature>
|
||||
|
||||
<section1 topic='When to Request Receipts' anchor='when'>
|
||||
<p>A sender <em>could</em> request receipts on any non-error message (chat, groupchat, headline, or normal) no matter if the recipient's address is a bare JID &LOCALBARE; or a full JID &LOCALFULL;. Whether it is <em>appropriate</em> or <em>advisable</em> to do so it another question. This section provides recommendations about when and when not to request receipts, and what results to expect in each scenario.</p>
|
||||
<section2 topic='Bare JID' anchor='when-bare'>
|
||||
<p>If the sender knows only the recipient's bare JID, it cannot cannot determine (via disco or caps) whether the intended recipient supports message receipts. In this case, the sender MAY request a receipt when sending a message of type "chat", "headline", or "normal" to the recipient's bare JID. However, the sender MUST NOT depend on receiving a receipt and MUST NOT resend the message if it does not receive a receipt.</p>
|
||||
</section2>
|
||||
<section2 topic='Full JID' anchor='when-full'>
|
||||
<p>If the sender knows a full JID for the recipient (e.g., via presence), it SHOULD attempt to determine (via disco or caps) whether the client at that full JID supports message receipts before attempting to request receipts. In this case, if the sender determines that the recipient's client supports message receipts then it SHOULD request a receipt when sending a message of type "chat", "headline", or "normal" to that full JID. The sender MAY depend on receiving a receipt and MAY resend the message if it does not receive a receipt within some configurable timeout period (however, resend logic is out of scope for this specification). If the sender determines that the recipient's client does not support message receipts then it SHOULD NOT request a receipt when sending a message to that full JID and MUST NOT resend the message if it does not receive a receipt.</p>
|
||||
</section2>
|
||||
<section2 topic='Groupchat' anchor='when-groupchat'>
|
||||
<p>It is NOT RECOMMENDED to request a receipt when sending a message of type "groupchat" in a &xep0045; room because the logic for determining when a message is truly "received" by all of the room occupants is complex and because the sender would receive one receipt from each occupant of the room, thus significantly increasing the number of messages sent through the room.</p>
|
||||
</section2>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Protocol Format' anchor='format'>
|
||||
<p>In order to make it possible for senders to request and for recipients to generate message receipts, we define a dedicated protocol extension qualified by the 'urn:xmpp:receipts' namespace.</p>
|
||||
<p>There are two allowable elements in this namespace:</p>
|
||||
<ul>
|
||||
<li><request/> -- included by a sending entity that wishes to know if the message has been received.</li>
|
||||
<li><received/> -- included by a receiving entity that wishes to inform the sending entity that the message has been received.</li>
|
||||
</ul>
|
||||
<p>Specifically, the receiving entity shall return a <received/> notice if it has received and processed the message. The term "processed" is understood to include presentation to a human user if appropriate or any other application-specific client-side processing, including generation of an error response if the application determines that the message contents cannot be handled.</p>
|
||||
<p>The following is an example of a message that includes a request for return receipt.</p>
|
||||
<example caption='A message with receipt requested'><![CDATA[
|
||||
<message
|
||||
from='northumberland@shakespeare.lit/westminster'
|
||||
id='richard2-4.1.247'
|
||||
to='kingrichard@royalty.england.lit/throne'>
|
||||
<body>My lord, dispatch; read o'er these articles.</body>
|
||||
<request xmlns='urn:xmpp:receipts'/>
|
||||
</message>
|
||||
]]></example>
|
||||
<example caption="Contact accepts offer and specifies parameters"><![CDATA[
|
||||
<message type='normal'
|
||||
from='kingrichard@royalty.england.lit/throne'
|
||||
to='northumberland@shakespeare.lit/westminster'
|
||||
id='init1'>
|
||||
<thread>ffd7076498744578d10edabfe7f4a866</thread>
|
||||
<feature xmlns='http://jabber.org/protocol/feature-neg'>
|
||||
<x xmlns='jabber:x:data' type='submit'>
|
||||
<field var='FORM_TYPE' type='hidden'>
|
||||
<value>urn:xmpp:ssn</value>
|
||||
</field>
|
||||
<field var='accept'>
|
||||
<value>true</value>
|
||||
</field>
|
||||
<field var='urn:xmpp:receipts'>
|
||||
<value>1</value>
|
||||
</field>
|
||||
</x>
|
||||
</feature>
|
||||
]]></example>
|
||||
<p class='box'>Note: A sender MUST include an 'id' attribute on every message that requests a receipt, so that the sender can properly track the receipt.</p>
|
||||
<p>The recipient shall generate a receipt if and only if it supports the protocol defined herein and it is configured to return receipts, either globally or for this recipient (otherwise it MUST NOT return a receipt and SHOULD NOT return an error).</p>
|
||||
<example caption='A message receipt'><![CDATA[
|
||||
<message
|
||||
from='kingrichard@royalty.england.lit/throne'
|
||||
id='richard2-4.1.247'
|
||||
to='northumberland@shakespeare.lit/westminster'>
|
||||
<received xmlns='urn:xmpp:receipts'/>
|
||||
</message>
|
||||
]]></example>
|
||||
</section1>
|
||||
<section1 topic='Implementation Notes' anchor='impl'>
|
||||
<p>Although a sender MAY attempt to resend a message if it knows that the recipient supports message receipts and it does not receive a reply within some configurable timeout period, resend logic is out of scope for this specification.</p>
|
||||
]]></example>
|
||||
<p>The <received/> element SHOULD be the only child of the &MESSAGE; stanza and MUST mirror the 'id' of the sent message.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Security Considerations' anchor='security'>
|
||||
<p>It is possible for a recipient to leak its presence when returning message receipts; therefore, a recipient SHOULD NOT return message receipts to senders who are not otherwise authorized to view its presence.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='IANA Considerations' anchor='iana'>
|
||||
<p>No interaction with &IANA; is necessary as a result of this document.</p>
|
||||
</section1>
|
||||
|
||||
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||
<section2 topic='Protocol Namespaces' anchor='ns'>
|
||||
<p>The ®ISTRAR; includes "urn:xmpp:receipts" in its registry of protocol namespaces (see &NAMESPACES;).</p>
|
||||
</section2>
|
||||
<section2 topic='Field Standardization' anchor='registrar-formtype'>
|
||||
<p>&xep0068; defines a process for standardizing the fields used within Data Forms qualified by a particular namespace, and the XMPP Registrar maintains a registry of such fields (see &FORMTYPES;). The Registrar shall add the following field for use in Stanza Session Negotiation forms:</p>
|
||||
<code caption='Registry Submission'><![CDATA[
|
||||
<form_type>
|
||||
<name>urn:xmpp:ssn</name>
|
||||
<field
|
||||
var='urn:xmpp:receipts'
|
||||
type='boolean'
|
||||
label='Whether to enable Message Receipts per XEP-0184'/>
|
||||
</form_type>
|
||||
]]></code>
|
||||
</section2>
|
||||
</section1>
|
||||
|
||||
<section1 topic='XML Schema' anchor='schema'>
|
||||
<code><![CDATA[
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
@ -263,6 +216,7 @@
|
||||
</xs:schema>
|
||||
]]></code>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Acknowledgements' anchor='ack'>
|
||||
<p>Thanks to Joe Kemp and Kevin Smith for their input.</p>
|
||||
</section1>
|
||||
|
Loading…
Reference in New Issue
Block a user