mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-24 10:12:19 -05:00
0.7
This commit is contained in:
parent
e5099cdad9
commit
97cb6900a9
49
xep-0280.xml
49
xep-0280.xml
@ -39,6 +39,12 @@
|
||||
<email>linuxwolf@outer-planes.net</email>
|
||||
<jid>linuxwolf@outer-planes.net</jid>
|
||||
</author>
|
||||
<revision>
|
||||
<version>0.7</version>
|
||||
<date>2012-10-12</date>
|
||||
<initials>mm</initials>
|
||||
<remark><p>Moved carbons <received/> and <sent/> flags from being a sibling of <forwarded/> to being a parent of <forwarded/>, in compliance with XEP-0297.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>0.6</version>
|
||||
<date>2012-01-06</date>
|
||||
@ -114,7 +120,7 @@
|
||||
</section1>
|
||||
<section1 topic='Use Cases' anchor='usecases'>
|
||||
<section2 topic='Discovering Support' anchor='disco'>
|
||||
<p>If a server implements the Message Carbons capability, it MUST specify the "urn:xmpp:carbons:1" feature in its service discovery information features as specified in &xep0030; or section 6.3 of &xep0115;. Clients SHOULD NOT attempt to enable or disable Carbons if their server does not support this feature.</p>
|
||||
<p>If a server implements the Message Carbons capability, it MUST specify the "urn:xmpp:carbons:2" feature in its service discovery information features as specified in &xep0030; or section 6.3 of &xep0115;. Clients SHOULD NOT attempt to enable or disable Carbons if their server does not support this feature.</p>
|
||||
<example caption='Client requests information about its own server'><![CDATA[
|
||||
<iq xmlns='jabber:client'
|
||||
type='get'
|
||||
@ -130,7 +136,7 @@
|
||||
id='info1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||
...
|
||||
<feature var='urn:xmpp:carbons:1'/>
|
||||
<feature var='urn:xmpp:carbons:2'/>
|
||||
...
|
||||
</query>
|
||||
</iq>]]></example>
|
||||
@ -142,7 +148,7 @@
|
||||
<iq xmlns='jabber:client'
|
||||
type='set'
|
||||
id='enable1'>
|
||||
<enable xmlns='urn:xmpp:carbons:1'/>
|
||||
<enable xmlns='urn:xmpp:carbons:2'/>
|
||||
</iq>]]></example>
|
||||
<p>Carbons will generally be enabled before the client sends the first undirected presence, to ensure that all inbound messages will be delivered according to the Carbon rules. The server will respond with an IQ result when Carbons are enabled:</p>
|
||||
<example caption='Server acknowledges Carbons enablement'><![CDATA[
|
||||
@ -157,7 +163,7 @@
|
||||
<iq xmlns='jabber:client'
|
||||
type='set'
|
||||
id='disable1'>
|
||||
<disable xmlns='urn:xmpp:carbons:1'/>
|
||||
<disable xmlns='urn:xmpp:carbons:2'/>
|
||||
</iq>]]></example>
|
||||
<p>The server will respond with an IQ result when Carbons are disabled:</p>
|
||||
<example caption='Server acknowledges Carbons disablement'><![CDATA[
|
||||
@ -265,14 +271,14 @@
|
||||
</message>
|
||||
]]></example>
|
||||
|
||||
<p>The copies sent to the Carbon-enabled resources are wrapped using &xep0297;. The wrapping message SHOULD maintain the same 'type' attribute value; the 'from' attribute MUST be the Carbon-enabled user's bare JID (e.g. "localpart@domain"); and the 'to' attribute SHOULD be the full JID of the resource receiving the copy. The content of the wrapping message MUST contain a <received xmlns='urn:xmpp:carbons:1'/> element and a <forwarded xmlns='urn:xmpp:forward:0'/> which contains the original message (properly namespaced as "jabber:client"):</p>
|
||||
<p>The copies sent to the Carbon-enabled resources are wrapped using &xep0297;. The wrapping message SHOULD maintain the same 'type' attribute value; the 'from' attribute MUST be the Carbon-enabled user's bare JID (e.g. "localpart@domain"); and the 'to' attribute SHOULD be the full JID of the resource receiving the copy. The content of the wrapping message MUST contain a <received xmlns='urn:xmpp:carbons:2'/> element and a <forwarded xmlns='urn:xmpp:forward:0'/> which contains the original message (properly namespaced as "jabber:client"):</p>
|
||||
|
||||
<example caption='Server sends carbon to Romeo's other clients'><![CDATA[
|
||||
<message xmlns='jabber:client'
|
||||
from='romeo@example.net'
|
||||
to='romeo@example.net/home'
|
||||
type='chat'>
|
||||
<received xmlns='urn:xmpp:carbons:1'/>
|
||||
<received xmlns='urn:xmpp:carbons:2'>
|
||||
<forwarded xmlns='urn:xmpp:forward:0'>
|
||||
<message xmlns='jabber:client'
|
||||
from='juliet@example.com/balcony'
|
||||
@ -282,6 +288,7 @@
|
||||
<thread>0e3141cd80894871a68e6fe6b1ec56fa</thread>
|
||||
</message>
|
||||
</forwarded>
|
||||
</received>
|
||||
</message>
|
||||
]]></example>
|
||||
</section2>
|
||||
@ -297,7 +304,7 @@
|
||||
<thread>0e3141cd80894871a68e6fe6b1ec56fa</thread>
|
||||
</message>]]></example>
|
||||
|
||||
<p>The copies sent to the Carbon-enabled resources are wrapped using &xep0297;. The wrapping message SHOULD maintain the same 'type' attribute value; the 'from' attribute MUST be the Carbon-enabled user's bare JID (e.g. "localpart@domain"); and the 'to' attribute SHOULD be the full JID of the resource receiving the copy. The content of the wrapping message MUST contain a <sent xmlns='urn:xmpp:carbons:1'/> element and a <forwarded xmlns='urn:xmpp:forward:0'/> which contains the original message (properly namespaced as "jabber:client"):</p>
|
||||
<p>The copies sent to the Carbon-enabled resources are wrapped using &xep0297;. The wrapping message SHOULD maintain the same 'type' attribute value; the 'from' attribute MUST be the Carbon-enabled user's bare JID (e.g. "localpart@domain"); and the 'to' attribute SHOULD be the full JID of the resource receiving the copy. The content of the wrapping message MUST contain a <sent xmlns='urn:xmpp:carbons:2'/> element and a <forwarded xmlns='urn:xmpp:forward:0'/> which contains the original message (properly namespaced as "jabber:client"):</p>
|
||||
|
||||
<example caption='Romeo's other Carbons-enabled clients
|
||||
receive a copy'><![CDATA[
|
||||
@ -305,7 +312,7 @@
|
||||
from='romeo@example.net'
|
||||
to='romeo@example.net/garden'
|
||||
type='chat'>
|
||||
<sent xmlns='urn:xmpp:carbons:1'/>
|
||||
<sent xmlns='urn:xmpp:carbons:2'>
|
||||
<forwarded xmlns='urn:xmpp:forward:0'>
|
||||
<message xmlns='jabber:client'
|
||||
to='juliet@example.com/balcony'
|
||||
@ -315,13 +322,14 @@
|
||||
<thread>0e3141cd80894871a68e6fe6b1ec56fa</thread>
|
||||
</message>
|
||||
</forwarded>
|
||||
</sent>
|
||||
</message>]]></example>
|
||||
|
||||
</section2>
|
||||
<section2 topic='Avoiding Carbons for a single message' anchor='avoiding'>
|
||||
<p>Some clients might want to avoid carbons on a single message, while still keeping all of the other semantics of Carbon support. This might be useful for clients sending end-to-end encrypted messages, for example.</p>
|
||||
|
||||
<p>To avoid a message being Carbon-copied to its other resources, the sending client MUST add a private element in the "urn:xmpp:carbons:1" namespace. When the sending server receives the message, it MUST NOT make carbon copies to the other Carbons-enabled resources, and MUST remove the private element before forwarding the message to the intended recipient.</p>
|
||||
<p>To avoid a message being Carbon-copied to its other resources, the sending client MUST add a private element in the "urn:xmpp:carbons:2" namespace. When the sending server receives the message, it MUST NOT make carbon copies to the other Carbons-enabled resources, and MUST remove the private element before forwarding the message to the intended recipient.</p>
|
||||
|
||||
<p><strong>Note:</strong> use of the private mechanism will lead to partial conversations on other devices. This is the intended effect.</p>
|
||||
|
||||
@ -332,7 +340,7 @@
|
||||
type='chat'>
|
||||
<body>Neither, fair saint, if either thee dislike.</body>
|
||||
<thread>0e3141cd80894871a68e6fe6b1ec56fa</thread>
|
||||
<private xmlns='urn:xmpp:carbons:1'/>
|
||||
<private xmlns='urn:xmpp:carbons:2'/>
|
||||
</message>]]></example>
|
||||
|
||||
<example caption='Romeo's server removes the private tag before forwarding, and does NOT send carbon copies to Romeo's other resources'><![CDATA[
|
||||
@ -379,7 +387,7 @@
|
||||
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
|
||||
<p>This specification defines the following XML namespace:</p>
|
||||
<ul>
|
||||
<li>urn:xmpp:carbons:1</li>
|
||||
<li>urn:xmpp:carbons:2</li>
|
||||
</ul>
|
||||
<p>Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
|
||||
</section2>
|
||||
@ -393,8 +401,8 @@
|
||||
|
||||
<xs:schema
|
||||
xmlns:xs='http://www.w3.org/2001/XMLSchema'
|
||||
targetNamespace='urn:xmpp:carbons:1'
|
||||
xmlns='urn:xmpp:carbons:1'
|
||||
targetNamespace='urn:xmpp:carbons:2'
|
||||
xmlns='urn:xmpp:carbons:2'
|
||||
elementFormDefault='qualified'>
|
||||
|
||||
<xs:element name='disable' type='empty'/>
|
||||
@ -403,16 +411,25 @@
|
||||
|
||||
<xs:element name='private' type='empty'/>
|
||||
|
||||
<xs:element name='received' type='empty'/>
|
||||
<xs:element name='received' type='forward-container'/>
|
||||
|
||||
<xs:element name='sent' type='empty'/>
|
||||
<xs:element name='sent' type='forward-container'/>
|
||||
|
||||
<xs:simpleType name='empty'>
|
||||
<xs:simpleType name='empty' abstract='true'>
|
||||
<xs:restriction base='xs:string'>
|
||||
<xs:enumeration value=''/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name='foward-container' abstract='true'>
|
||||
<xs:choice>
|
||||
<xs:element name='forwarded'
|
||||
namespace='urn:xmpp:forward:0'
|
||||
minOccurs='1'
|
||||
maxOccurs='1'/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
||||
]]></code>
|
||||
</section1>
|
||||
|
Loading…
Reference in New Issue
Block a user