%ents; ]>
Message Retraction This specification defines a method for indicating that a message should be retracted. &LEGALNOTICE; 0424 Deferred Standards Track Standards Council XMPP Core XMPP IM XEP-0313 XEP-0421 XEP-0422 message-retract &lance; &jcbrand; 0.3.0 2020-05-17 jcb
  • Clarify when a service must advertise support via disco.
  • Add another service discovery URN for tombstones.
0.2.1 2020-03-25 jcb Recommend XEP-0428 fallback body and XEP-0334 store hint 0.2.0 2019-11-11 jcb Replace the message contents with a tombstone (instead of the message itself) and require an origin-id in tombstone 0.1.0 2019-11-01 XEP Editor (jcb) Accepted by vote of Council on 2019-10-23. 0.0.4 2019-09-25 jcb

Remove MUC moderation use-case which will go into a separate XEP

0.0.3 2016-10-19 ljts

Fix the XEP title to be Message Retraction.

0.0.2 2016-10-12 ljts

Use the term 'retraction' instead of 'deletion'. Added tombstone marker.

0.0.1 2015-07-07 ljts

First draft.

A chat participant might want to retract a message which they've already sent out, for example if they've mistakenly sent it to the wrong recipient or groupchat.

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 unenforceable request 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.

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;.

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.

]]> ... ... ]]>

Consider a situation where a user sends a message to the wrong recipient:

Have not saints lips, and holy palmers too? ]]>

The message author notices that the message was sent to the wrong recipient and indicates to their client that the message should be retracted.

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.

This person attempted to retract a previous message, but it's unsupported by your client. ]]>

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.

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'.

A service which supports tombstones MUST advertise the 'urn:xmpp:message-retract:0#tombstone' feature in its Service Discovery responses.

]]> ... ... ]]>

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).

The <retracted/> element SHOULD also include a 'stamp' attribute indicating the time at which the retraction took place.

As with other XEP-0313 archived messages, the &xep0203; <delay/> element is used to indicate when the original message was received.

]]>

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.

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').

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.

A client MAY inform the user that a no-longer displayed message did previously exist and has been removed.

Clients MUST set the XEP-0359 'origin id' attribute on sent messages to make them suitable for message retraction.

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.

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;).

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;.

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.

To prevent message spoofing, it's very important that the JID or occupant id of message retractions are checked (as explained in the Business Rules section).

None.

The ®ISTRAR; includes 'urn:xmpp:message-retract:0' in its registry of protocol namespaces (see &NAMESPACES;).

  • urn:xmpp:message-retract:0
&NSVER;
]]>