1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-22 01:02:17 -05:00

Merge commit 'refs/pull/618/head' of https://github.com/xsf/xeps

This commit is contained in:
Jonas Wielicki 2018-04-15 15:24:56 +02:00
commit 2b7da0bf24

View File

@ -24,6 +24,12 @@
<supersededby/> <supersededby/>
<shortname>IM-NG</shortname> <shortname>IM-NG</shortname>
&ksmith; &ksmith;
<revision>
<version>0.0.2</version>
<date>2018-03-29</date>
<initials>kis</initials>
<remark><p>Fix various slips, mention reflection.</p></remark>
</revision>
<revision> <revision>
<version>0.0.1</version> <version>0.0.1</version>
<date>2018-03-28</date> <date>2018-03-28</date>
@ -83,14 +89,13 @@
type='result'/>]]></example> type='result'/>]]></example>
</section2> </section2>
<section2 topic='Sending messages' anchor='sending'> <section2 topic='Sending messages' anchor='sending'>
<p>When an entity wants to send a non-error message to be handled by all a user's IM-NG clients they will send it to the user's bare JID, which the receiving server then MUST send to all IM-NG resources.</p> <p>When an entity wants to send a non-error message to be handled by all a user's IM-NG clients they will send it to the user's bare JID, which the receiving server then MUST send to all the contact's IM-NG resources, and the sending server must reflect to all the user's IM-NG resources.</p>
<example caption='Client sends a message that IM-NG will route to all resources'><![CDATA[ <example caption='Client sends a message that IM-NG will route to all resources'><![CDATA[
<message xmlns='jabber:client' <message xmlns='jabber:client'
from='montague@montague.example/bas149a' from='montague@montague.example/bas149a'
to='benvolio@shakespeare.example' to='benvolio@shakespeare.example'
id='342' id='342'
type='chat'> type='chat'>
<im-ng xmlns='urn:xmpp:im-ng:0'/>
<body>I neither know it nor can learn of him</body> <body>I neither know it nor can learn of him</body>
</message>]]></example> </message>]]></example>
<p>When an entity wants to send a non-error message to be received exclusively by a single resource, they include an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element in the message. An IM-NG server receiving this MUST then send it to only the specified resource, if available, or respond with an error consistent with RFC-6121 ("return an error stanza to the sender, which SHOULD be &lt;service-unavailable/&gt;").</p> <p>When an entity wants to send a non-error message to be received exclusively by a single resource, they include an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element in the message. An IM-NG server receiving this MUST then send it to only the specified resource, if available, or respond with an error consistent with RFC-6121 ("return an error stanza to the sender, which SHOULD be &lt;service-unavailable/&gt;").</p>
@ -106,11 +111,13 @@
</section1> </section1>
<section1 topic='Business Rules' anchor='rules'> <section1 topic='Business Rules' anchor='rules'>
<p>Any message of normal type, or type 'chat', 'groupchat' or 'headline' sent to a bare JID is distributed to all IM-NG clients (error messages sent to the bare JID are in response to server-generated stanzas, and so are not routed to clients).</p> <p>Any message of normal type, or type 'chat', 'groupchat' or 'headline' sent to a bare JID is distributed to all IM-NG clients (error messages sent to the bare JID are in response to server-generated stanzas, and so are not routed to clients).</p>
<p>A message of type error, sent to a full JID without an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element is to be distributed to all IM-NG clients</p>
<p>Any message that is routed to all IM-NG clients is stored in the MAM archive, where available, and any message that would not be routed to all IM-NG clients is not stored in the MAM archive</p> <p>Any message that is routed to all IM-NG clients is stored in the MAM archive, where available, and any message that would not be routed to all IM-NG clients is not stored in the MAM archive</p>
<p>In order for interoperatility with other entities (contacts, remote servers etc.) that don't support IM-NG, old-style full-JID messages also need to be handled. When a server receives a message with type other than normal or 'chat' that does not contain an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element are routed by the above rules as if they were sent to the bare JID</p> <p>In order for interoperability with other entities (contacts, remote servers etc.) that don't support IM-NG, old-style full-JID messages also need to be handled. When a server receives a message with type other than than 'groupchat' or 'headline' that does not contain an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element it is to be routed by the above rules as if they were sent to the bare JID</p>
<p>A client activating IM-NG MUST NOT also activate Carbons.</p> <p>A client activating IM-NG MUST NOT also activate Carbons.</p>
<p>An IM-NG client SHOULD send all IM-related messages to bare JIDs (as full-JID messages would not be distributed appropriately).</p> <p>An IM-NG client SHOULD send all IM-related messages to bare JIDs (as full-JID messages would not be distributed appropriately).</p>
<p>An IM-NG client SHOULD ignore any IM-related messages that are sent to a full-JID with an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element (see Security Considerations).</p> <p>An IM-NG client SHOULD ignore any IM-related messages that are sent to a full-JID with an &lt;im-ng xmlns='urn:xmpp:im-ng:0'&gt; element (see Security Considerations).</p>
<p>When reflecting an IM-NG client's outbound bare-JID messages, the server SHOULD reflect the archived version (i.e. after any transforms have taken place).</p>
</section1> </section1>
<!--<section1 topic='Implementation Notes' anchor='impl'> <!--<section1 topic='Implementation Notes' anchor='impl'>
<p>OPTIONAL.</p> <p>OPTIONAL.</p>