Fix disco#info example to use correct addresses.
Reword note about how to handle LMC in cases where it is not clear that all recipients support it.
Clear up confusion about subsequent corrections and ids (it's the payloads getting replaced, not the message identity). Allow corrections from the bare JID unless for group chats.
Per a vote of the XMPP Council, advanced specification from Experimental to Draft.
Updates to address Last Call feedback.
Initial published version.
Adding discovery, as discussed as a prerequisite to acceptance with Council.
First draft.
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.
If a client implements message correction, it MUST specify the 'urn:xmpp:message-correct:0' feature in its service discovery information features as specified in Service Discovery (XEP-0030)
Message corrections sent to clients that do not support them will be rendered as duplicate (corrected) messages. In most Instant Messaging environments (particularly within a Multi-User Chat (XEP-0045)
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. The receiving client then treats the newly received payloads as completely replacing all payloads of the original message.
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.
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.
A client SHOULD alert the user that the displayed message has been edited since it was originally sent.
Clients MUST send ids on messages if they allow the user to correct messages.
To deal with multiple payloads, the sender MUST re-send the entire stanza, only altering id and the payloads being corrected and adding the 'replace' payload. It is expected that the receiver SHOULD then treat the new stanza as complete replacement for all the payloads received in the original stanza.
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 or a file transfer part.
A single message may be corrected multiple times by subsequent edits.
A correction MUST only be allowed when both the original message and correction originate from the same sender
While it's not possible to prevent this protocol from being used in such a way, it is not intended that it provides a way to continue expanding a previous message indefinitely and clients, in as much as it is sensible, should present use of this extension only for correction rather than for providing a continuous stream, for which In-Band Real Time Text (XEP-0301)
If the same message is to be corrected several times, the id of the original message is used in each case (e.g. If a message of id 1 is corrected by a message of id 2, a subsequent correction should correct 1, not 2).
Correction MUST only be used to change the logical content details of a stanza (e.g. the message body) and not to change the nature of the stanza or its metadata (e.g. correction MUST NOT be used to turn a chat message into a pubsub notification). Where a correction stanza includes metadata, for example stanza or MAM ids, these are properties of the correction stanza, and do not correct aspects of the original stanza.
While it is possible to use this protocol to correct messages older than the most recent received from a full JID, such use is out of scope for this document and support for this SHOULD NOT be assumed without further negotiation.
The replacement message could have an entirely different meaning from the original message, so clients will need to make users aware that the displayed message has been edited. It is also suggested that clients make the original message available in some way, although this UI consideration is out of the scope of this document.
There exist some payload types where correction is problematic, for some deployments. In particular, care needs to be taken that security labels from Security Labels in XMPP (XEP-0258)
When used in a Multi-User Chat (XEP-0045)
None.
The XMPP Registrar
If the protocol defined in this specification undergoes a revision that is not fully backwards-compatible with an older version, the XMPP Registrar shall increment the protocol version number found at the end of the XML namespaces defined herein, as described in Section 4 of XEP-0053.
]]>
The author thanks those who provided feedback during Last Call: Kurt Zeilenga, Philipp Hancke, Dave Cridland, Mark Rejhon, Gunnar Helström, Andreas Kuckartz, Matthew Miller, Kim Alvefur and Peter Saint-Andre.