XEP-0424: Clarify purpose and markup for tombstones

- mandate requirement for origin-id in tombstones so that subsequent retractions can be matched to them
- wrap tombstones in a <message> element
This commit is contained in:
JC Brand 2019-11-11 11:04:14 +01:00
parent 364344054f
commit b6897e8fff
1 changed files with 17 additions and 4 deletions

View File

@ -26,6 +26,12 @@
<shortname>message-retract</shortname>
&lance;
&jcbrand;
<revision>
<version>0.2.0</version>
<date>2019-11-11</date>
<initials>jcb</initials>
<remark>Replace the message contents with a tombstone (instead of the message itself) and require an origin-id in tombstone</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2019-11-01</date>
@ -91,7 +97,7 @@
</message>]]></example>
<p>The message author notices that the message was sent to the wrong recipient and indicates to their client that the message should be retracted.</p>
<p>The client sends out a retraction message which uses &xep0422; to indicate that it applies to the wrongly sent message by referring to its XEP-0359 origin ID.</p>
<p>The client sends out a retraction message which uses &xep0422; to indicate that it applies to the wrongly sent message by referring to its &xep0359; origin ID.</p>
<example caption="The client sends out a retraction message"><![CDATA[
<message type='chat' to='lord@capulet.example' id='retract-message-1'>
@ -102,14 +108,21 @@
</section1>
<section1 topic='Tombstones' anchor='tombstones'>
<p>An archiving service MAY replace a retracted message with a 'tombstone' recording the fact that the message was retracted (but otherwise preserving the fact that the message did once exist in order to aid synchronizing archives). The message gets replaced with a &lt;retracted/&gt; element which SHOULD include a 'by' attribute specifying the JID of the entity that sent the retraction and a 'stamp' attribute indicating the time at which the retraction took place.</p>
<p>It might be desirable to remove the retracted message from a &xep0313; service, while still recording the fact that it once existed, in order to aid clients in synchronizing their archives. To do this, the archiving service MAY replace the retracted message contents with a 'tombstone'.</p>
<p>The original message contents (i.e. the &lt;body/&gt; and any related elements which might leak information about the original message) get replaced with a &lt;retracted/&gt; element which MUST include its &lt;origin-id/&gt;, so that clients can match it to the subsequent retraction (which MUST also be stored in the archive).</p>
<p>The &lt;retracted/&gt; element SHOULD also include a 'stamp' attribute indicating the time at which the retraction took place.</p>
<p>As with other XEP-0313 archived messages, the &xep0203; &lt;delay/&gt; element is used to indicate when the original message was received.</p>
<example caption='Retracted message tombstone in a MAM result'><![CDATA[
<message id='aeb213' to='lord@capulet.example/chamber'>
<result xmlns='urn:xmpp:mam:2' queryid='f27' id='28482-98726-73623'>
<result xmlns='urn:xmpp:mam:2' queryid='f27' id='stanza-id-1'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2019-09-20T23:08:25Z'/>
<retracted by="romeo@montague.example" stamp='2019-09-20T23:09:32Z' xmlns='urn:xmpp:message-retract:0' />
<message type="groupchat" from="romeo@montague.example" to="lord@capulet.example" id="wrong-recipient-1">
<retracted stamp='2019-09-20T23:09:32Z' xmlns='urn:xmpp:message-retract:0'>
<origin-id xmlns='urn:xmpp:sid:0' id='origin-id-1'/>
</retracted>
</message>
</forwarded>
</result>
</message>]]></example>