mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-14 05:15:07 -05:00
XEP-0424: Remove dependency on XEP-0422 'Message Fastening'
This commit is contained in:
parent
4377475d6d
commit
25e24aa46f
78
xep-0424.xml
78
xep-0424.xml
@ -20,13 +20,24 @@
|
|||||||
<spec>XMPP IM</spec>
|
<spec>XMPP IM</spec>
|
||||||
<spec>XEP-0313</spec>
|
<spec>XEP-0313</spec>
|
||||||
<spec>XEP-0421</spec>
|
<spec>XEP-0421</spec>
|
||||||
<spec>XEP-0422</spec>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<supersedes/>
|
<supersedes/>
|
||||||
<supersededby/>
|
<supersededby/>
|
||||||
<shortname>message-retract</shortname>
|
<shortname>message-retract</shortname>
|
||||||
&lance;
|
&lance;
|
||||||
&jcbrand;
|
&jcbrand;
|
||||||
|
<revision>
|
||||||
|
<version>0.4.0</version>
|
||||||
|
<date>2023-02-19</date>
|
||||||
|
<initials>jcb</initials>
|
||||||
|
<remark>
|
||||||
|
<ul>
|
||||||
|
<li>Remove the dependency on XEP-0422 Message Fastening.</li>
|
||||||
|
<li>Use 'id' attribute on 'retracted' element instead of a child element.</li>
|
||||||
|
<li>Clarify business rlies regarding which 'id' to use to refer to the retracted message.</li>
|
||||||
|
</ul>
|
||||||
|
</remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.3.0</version>
|
<version>0.3.0</version>
|
||||||
<date>2020-05-17</date>
|
<date>2020-05-17</date>
|
||||||
@ -86,8 +97,8 @@
|
|||||||
<p>Due to the federated and extensible nature of XMPP it's not possible to remove a message with full certainty and a retraction can only be considered an <strong>unenforceable request</strong> for such removal. Clients which don't support message retraction are not obligated to enforce the request and people could have seen or copied the message contents already.</p>
|
<p>Due to the federated and extensible nature of XMPP it's not possible to remove a message with full certainty and a retraction can only be considered an <strong>unenforceable request</strong> for such removal. Clients which don't support message retraction are not obligated to enforce the request and people could have seen or copied the message contents already.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Discovering support' anchor='disco'>
|
<section1 topic='Discovering support' anchor='disco'>
|
||||||
<p>If a client implements message retractions, it MUST specify the 'urn:xmpp:message-retract:0' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
|
<p>If a client implements message retractions, it MUST specify the 'urn:xmpp:message-retract:1' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
|
||||||
<p>Similarly, a server that is aware of message retractions and will therefore ensure that they're archived for later retrieval (e.g.via &xep0313;), MUST also advertise the 'urn:xmpp:message-retract:0' feature.</p>
|
<p>Similarly, a server that is aware of message retractions and will therefore ensure that they're archived for later retrieval (e.g.via &xep0313;), MUST also advertise the 'urn:xmpp:message-retract:1' feature.</p>
|
||||||
<example caption='Client requests information about a chat partner's client'><![CDATA[
|
<example caption='Client requests information about a chat partner's client'><![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='romeo@montague.example/orchard'
|
from='romeo@montague.example/orchard'
|
||||||
@ -102,7 +113,7 @@
|
|||||||
id='info1'>
|
id='info1'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||||
...
|
...
|
||||||
<feature var='urn:xmpp:message-retract:0'/>
|
<feature var='urn:xmpp:message-retract:1'/>
|
||||||
...
|
...
|
||||||
</query>
|
</query>
|
||||||
</iq>]]></example>
|
</iq>]]></example>
|
||||||
@ -116,19 +127,17 @@
|
|||||||
</message>]]></example>
|
</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 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 &xep0359; origin ID.</p>
|
<p>The client sends out a retraction message and uses the &xep0359; origin ID to refer to the original message that should be removed.</p>
|
||||||
|
<p>In the case of a group chat message, for example &xep0045;, instead of the origin ID, the XEP-0359 stanza ID that was assigned by the group chat SHOULD be used.</p>
|
||||||
|
|
||||||
<example caption="The client sends out a retraction message"><![CDATA[
|
<example caption="The client sends out a retraction message"><![CDATA[
|
||||||
<message type='chat' to='lord@capulet.example' id='retract-message-1'>
|
<message type='chat' to='lord@capulet.example' id='retract-message-1'>
|
||||||
<apply-to id="origin-id-1" xmlns="urn:xmpp:fasten:0">
|
<retract id="origin-id-1" xmlns='urn:xmpp:message-retract:1'/>
|
||||||
<retract xmlns='urn:xmpp:message-retract:0'/>
|
|
||||||
</apply-to>
|
|
||||||
<fallback xmlns="urn:xmpp:fallback:0"/>
|
<fallback xmlns="urn:xmpp:fallback:0"/>
|
||||||
<body>This person attempted to retract a previous message, but it's unsupported by your client.</body>
|
<body>This person attempted to retract a previous message, but it's unsupported by your client.</body>
|
||||||
<store xmlns="urn:xmpp:hints"/>
|
<store xmlns="urn:xmpp:hints"/>
|
||||||
</message>]]></example>
|
</message>]]></example>
|
||||||
|
|
||||||
|
|
||||||
<p>It's RECOMMENDED that you include a &xep0428; tag with fallback text in the <body/>, so that older clients can still indicate the intent to retract and so that older servers will archive the retraction. Additionally, you MAY include a &xep0334; <store/> hint, to indicate that the stanza needs to be archived.</p>
|
<p>It's RECOMMENDED that you include a &xep0428; tag with fallback text in the <body/>, so that older clients can still indicate the intent to retract and so that older servers will archive the retraction. Additionally, you MAY include a &xep0334; <store/> hint, to indicate that the stanza needs to be archived.</p>
|
||||||
|
|
||||||
</section1>
|
</section1>
|
||||||
@ -136,7 +145,7 @@
|
|||||||
<section1 topic='Tombstones' anchor='tombstones'>
|
<section1 topic='Tombstones' anchor='tombstones'>
|
||||||
<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>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>A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:0#tombstone' feature in its Service Discovery responses.</p>
|
<p>A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:1#tombstone' feature in its Service Discovery responses.</p>
|
||||||
|
|
||||||
<example caption='Client requests service discovery information from the server'><![CDATA[
|
<example caption='Client requests service discovery information from the server'><![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
@ -152,12 +161,19 @@
|
|||||||
id='info1'>
|
id='info1'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||||
...
|
...
|
||||||
<feature var='urn:xmpp:message-retract:0#tombstone'/>
|
<feature var='urn:xmpp:message-retract:1#tombstone'/>
|
||||||
...
|
...
|
||||||
</query>
|
</query>
|
||||||
</iq>]]></example>
|
</iq>]]></example>
|
||||||
|
|
||||||
<p>When replacing the original message with a tombstone, the original contents (i.e. the <body/> and any related elements which might leak information about the original message) get replaced with a <retracted/> element which MUST include the <origin-id/>, so that clients can match it to the subsequent retraction (which MUST also be stored in the archive).</p>
|
<p>
|
||||||
|
When replacing the original message with a tombstone, the original contents
|
||||||
|
(i.e. the <body/> and any related elements which might leak information about the original message)
|
||||||
|
get replaced with a <retracted/> element which MUST include an 'id' attribute referring to the
|
||||||
|
original message as detailed in the section on <link url='#business-id'>using the correct ID</link>,
|
||||||
|
so that clients can match it to the subsequent retraction
|
||||||
|
(which MUST also be stored in the archive).
|
||||||
|
</p>
|
||||||
<p>The <retracted/> element SHOULD also include a 'stamp' attribute indicating the time at which the retraction took place.</p>
|
<p>The <retracted/> 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; <delay/> element is used to indicate when the original message was received.</p>
|
<p>As with other XEP-0313 archived messages, the &xep0203; <delay/> element is used to indicate when the original message was received.</p>
|
||||||
|
|
||||||
@ -167,9 +183,7 @@
|
|||||||
<forwarded xmlns='urn:xmpp:forward:0'>
|
<forwarded xmlns='urn:xmpp:forward:0'>
|
||||||
<delay xmlns='urn:xmpp:delay' stamp='2019-09-20T23:08:25Z'/>
|
<delay xmlns='urn:xmpp:delay' stamp='2019-09-20T23:08:25Z'/>
|
||||||
<message type="groupchat" from="romeo@montague.example" to="lord@capulet.example" id="wrong-recipient-1">
|
<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'>
|
<retracted stamp='2019-09-20T23:09:32Z' xmlns='urn:xmpp:message-retract:1' id='origin-id-1'/>
|
||||||
<origin-id xmlns='urn:xmpp:sid:0' id='origin-id-1'/>
|
|
||||||
</retracted>
|
|
||||||
</message>
|
</message>
|
||||||
</forwarded>
|
</forwarded>
|
||||||
</result>
|
</result>
|
||||||
@ -178,13 +192,31 @@
|
|||||||
|
|
||||||
<section1 topic='Business Rules' anchor='rules'>
|
<section1 topic='Business Rules' anchor='rules'>
|
||||||
<p>A receiving client can choose to remove the retracted message from whatever display is used for messages, from any stored history, or choose to display the fact that a message has been retracted in another way.</p>
|
<p>A receiving client can choose to remove the retracted message from whatever display is used for messages, from any stored history, or choose to display the fact that a message has been retracted in another way.</p>
|
||||||
<p>A MUC or other service that supports message retraction SHOULD prevent further distribution of the message by the service (e.g., by not replaying the message to new occupants joiningthe room, omitting the message from history archive requests where possible, or replacing the original message with a 'tombstone').</p>
|
<p>A MUC or other service that supports message retraction SHOULD prevent further distribution of the message by the service (e.g., by not replaying the message to new occupants joining the room, omitting the message from history archive requests where possible, or replacing the original message with a 'tombstone').</p>
|
||||||
<p>Some clients may have been offline while the retraction was issued. The archiving service therefore MUST store the retraction message, regardless of whether the original message is deleted or replaced with a tombstone. These clients will then become aware of the retraction as soon as they catch up with the archive.</p>
|
<p>Some clients may have been offline while the retraction was issued. The archiving service therefore MUST store the retraction message, regardless of whether the original message is deleted or replaced with a tombstone. These clients will then become aware of the retraction as soon as they catch up with the archive.</p>
|
||||||
<p>A client MAY inform the user that a no-longer displayed message did previously exist and has been removed.</p>
|
<p>A client MAY inform the user that a no-longer displayed message did previously exist and has been removed.</p>
|
||||||
<p>Clients MUST set the XEP-0359 'origin id' attribute on sent messages to make them suitable for message retraction.</p>
|
<p>Clients SHOULD add the &xep0359; <origin-id> on sent one-on-one "chat" messages to make them suitable for message retraction.</p>
|
||||||
<p>The Sender MUST NOT send a retraction request for a message with non-messaging payloads. For example, a sender MUST NOT send a retraction for a roster item exchange request or a file transfer part.</p>
|
<p>The Sender MUST NOT send a retraction request for a message with non-messaging payloads. For example, a sender MUST NOT send a retraction for a roster item exchange request or a file transfer part.</p>
|
||||||
<p>A retraction (that's not part of a &xep0425; operation) MUST only be processed when both the original message and the retraction request are received from the same bare-JID (in a one-on-one conversation) or full-JID (in a non-anonymous MUC from &xep0045;).</p>
|
<p>A retraction (that's not part of a &xep0425; operation) MUST only be processed when both the original message and the retraction request are received from the same bare-JID (in a one-on-one conversation) or full-JID (in a non-anonymous MUC from &xep0045;).</p>
|
||||||
<p>When used in a semi-anonymous MUC, the recipient client MUST check that a message retraction was sent by the author of the retracted message by checking the occupant id from &xep0421;.</p>
|
<p>When used in a semi-anonymous MUC, the recipient client MUST check that a message retraction was sent by the author of the retracted message by checking the occupant id from &xep0421;.</p>
|
||||||
|
|
||||||
|
<section2 topic='Using the correct ID' anchor='business-id'>
|
||||||
|
<p>
|
||||||
|
For messages of type 'groupchat', the stanza's &xep0359; 'origin ID' MUST NOT be
|
||||||
|
used for retractions. Instead, in group chat situations, the ID assigned to
|
||||||
|
the stanza by the group chat itself must be used. This is discovered in a
|
||||||
|
<stanza-id> element with a 'by' attribute that matches the bare JID
|
||||||
|
of the group chat, as defined in &xep0359;.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This implies that group chat messages without a &xep0359; stanza ID cannot be retracted.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
For other message types the sender should use the 'id' from a &xep0359;
|
||||||
|
<origin-id> if present, or the value of the 'id' attribute on the
|
||||||
|
<message> otherwise.
|
||||||
|
</p>
|
||||||
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Security Considerations' anchor='security'>
|
<section1 topic='Security Considerations' anchor='security'>
|
||||||
<p>There can never be a guarantee that a retracted message was never seen or otherwise distributed, and it is encouraged for clients and services when possible to inform users that no such guarantee exists.</p>
|
<p>There can never be a guarantee that a retracted message was never seen or otherwise distributed, and it is encouraged for clients and services when possible to inform users that no such guarantee exists.</p>
|
||||||
@ -195,9 +227,9 @@
|
|||||||
</section1>
|
</section1>
|
||||||
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
|
||||||
<section2 topic='Protocol Namespaces' anchor='ns'>
|
<section2 topic='Protocol Namespaces' anchor='ns'>
|
||||||
<p>The ®ISTRAR; includes 'urn:xmpp:message-retract:0' in its registry of protocol namespaces (see &NAMESPACES;).</p>
|
<p>The ®ISTRAR; includes 'urn:xmpp:message-retract:1' in its registry of protocol namespaces (see &NAMESPACES;).</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>urn:xmpp:message-retract:0</li>
|
<li>urn:xmpp:message-retract:1</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
|
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
|
||||||
@ -210,11 +242,13 @@
|
|||||||
|
|
||||||
<xs:schema
|
<xs:schema
|
||||||
xmlns:xs='http://www.w3.org/2001/XMLSchema'
|
xmlns:xs='http://www.w3.org/2001/XMLSchema'
|
||||||
targetNamespace='urn:xmpp:message-retract:0'
|
targetNamespace='urn:xmpp:message-retract:1'
|
||||||
xmlns='urn:xmpp:message-retract:0'
|
xmlns='urn:xmpp:message-retract:1'
|
||||||
elementFormDefault='qualified'>
|
elementFormDefault='qualified'>
|
||||||
|
|
||||||
<xs:element name='retract'></xs:element>
|
<xs:element name='retract'>
|
||||||
|
<xs:attribute name='id' type='xs:string' use='required'/>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name='retracted'>
|
<xs:element name='retracted'>
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
|
Loading…
Reference in New Issue
Block a user