1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-09 19:05:05 -05:00
xeps/xep-0308.xml
2011-11-10 10:53:26 -07:00

133 lines
5.8 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Last Message Correction</title>
<abstract>This specification defines a method for marking a message as a correction of the last sent message.</abstract>
&LEGALNOTICE;
<number>0308</number>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&ksmith;
<revision>
<version>0.1</version>
<date>2011-11-10</date>
<initials>psa</initials>
<remark><p>Initial published version.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2011-10-30</date>
<initials>kis</initials>
<remark><p>Adding discovery, as discussed as a prerequisite to acceptance with Council.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2010-07-20</date>
<initials>kis</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>When sending a message, people often introduce typing errors and send a follow-up message to correct them. This specification allows the sending client to flag the second message as correcting the first.</p>
</section1>
<section1 topic='Discovering support' anchor='disco'>
<p>If a server implements message correction, it MUST specify the 'urn:xmpp:message-correct:0' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
<example caption='Client requests information about a chat partner&apos;s client'><![CDATA[
<iq type='get'
from='romeo@montague.net/orchard'
id='info1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Partner&apos;s client advertises support for correction'><![CDATA[
<iq type='get'
to='romeo@montague.net/home'
from='montague.net'
id='info1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:message-correct:0'/>
...
</query>
</iq>]]></example>
</section1>
<section1 topic='Use Case' anchor='usecase'>
<p>When a user indicates to the client that he wants to correct the most recently sent message to a contact, the client will resend the corrected message with a new id, and with the replace payload refering to the previous message by id.</p>
<example caption='User sends a message with a mistake in'><![CDATA[
<message to='juliet@capulet.net/balcony' id='bad1'>
<body>But soft, what light through yonder airlock breaks?</body>
</message>]]></example>
<example caption='User corrects the message and sends'><![CDATA[
<message to='juliet@capulet.net/balcony' id='good1'>
<body>But soft, what light through yonder window breaks?</body>
<replace id='bad1' xmlns='urn:xmpp:message-correct:0'/>
</message>]]></example>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<p>The 'id' attribute is included on the replace to prevent situations where messages being routed to a different resource than the intended cause incorrect replacements.</p>
<p>A receiving client can choose to replace the previous message in whatever display is used for messages, or in any stored history, or can choose to display the correction in another way.</p>
<p>A client SHOULD alert the user that the displayed message has been edited since it was originally sent.</p>
<p>Clients MUST send ids on messages if they allow the user to correct messages.</p>
<p>To deal with multiple payloads, the sender MUST re-send the entire stanza with only the id and the corrections changed. It is expected that the receiver will then treat the new stanza as complete replacement, but such logic is ultimately the resposibility of the client.</p>
<p> The Sender MUST NOT include a correction for a message with non-messaging payloads. For example, a sender MUST NOT include a correction for a roster item exchange request.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>The replacement message could have an entirely different meaning from the original message, so clients will need to warn users that the displayed message has been edited.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>None.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>Upon advancement of this specification, the &REGISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.</p>
<p>The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:</p>
<ul>
<li>urn:xmpp:message-correct:0</li>
</ul>
</section2>
<section2 topic='Service Discovery Identities' anchor='registrar-identity'>
<code caption='Registry Submission'><![CDATA[
<var>
<name>urn:xmpp:message-correct:0</name>
<desc>Support for message correction</desc>
<doc>THIS PROTOXEP</doc>
</var>]]></code>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:message-correct:0'
xmlns='urn:xmpp:message-correct:0'
elementFormDefault='qualified'>
<xs:element name='replace'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='id' type='xs:string' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
]]></code>
</section1>
</xep>