XEP-xxxx: Last Message Correction

Abstract:This specification defines a method for marking a message as a correction of the last sent message.
Author:Kevin Smith
Copyright:© 1999 - 2010 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status:ProtoXEP
Type:Standards Track
Version:0.0.1
Last Updated:2010-07-20

WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <http://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.


Table of Contents


1. Introduction
2. Discovering support
3. Use Case
4. Business Rules
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
    7.1. Protocol Namespaces
    7.2. Service Discovery Identities
8. XML Schema

Appendices
    A: Document Information
    B: Author Information
    C: Legal Notices
    D: Relation to XMPP
    E: Discussion Venue
    F: Requirements Conformance
    G: Notes
    H: Revision History


1. Introduction

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.

2. Discovering support

Standard stuff. To come later.

Allow advertisement either for last message only, or any message replacement.

3. Use Case

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.

Example 1. User sends a message with a mistake in

<message to='juliet@capulet.net/balcony' id='bad1'>
  <body>But soft, what light through yonder airlock breaks?</body>
</message>

Example 2. User corrects the message and sends

<message to='juliet@capulet.net/balcony' id='good1'>
  <body>But soft, what light through yonder window breaks?</body>
  <replace id='bad1' xmlns='http://swift.im/protocol/replace'/>
</message>

4. Business Rules

The 'id' attribute is included on the replace payload even if the receiving entity has been shown, through previous service discovery, to only support updating the most recent message. This prevents situations where messages being routed to a different resource than the intended cause incorrect replacements. If a client supporting correction only of the most recent message receives a correction for a message that is not the most recent, it should return an error stanza

example error stanza

A receiving client MAY choose to replace the previous message in whatever display is used for messages, or in any stored history, or MAY 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.

Deal with multiple payloads. Sender MUST re-send entire stanza with only the id and the corrections changed. Receiver treats new stanza as complete replacement.

Sender MUST NOT include a correction for a message with a non-messaging body. For example, a sender MUST NOT include a correction for a roster item exchange request.

5. Security Considerations

The replacement message could have an entirely different meaning from the original message - this is why clients will warn users that the displayed message has been edited..

6. IANA Considerations

None.

7. XMPP Registrar Considerations

7.1 Protocol Namespaces

Until this specification advances to a status of Draft, its associated namespaces shall be:

Upon advancement of this specification, the XMPP Registrar [1] shall issue permanent namespaces in accordance with the process defined in Section 4 of XMPP Registrar Function [2].

The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:

7.2 Service Discovery Identities

To follows.

8. XML Schema

To follow.


Appendices


Appendix A: Document Information

Series: XEP
Number: xxxx
Publisher: XMPP Standards Foundation
Status: ProtoXEP
Type: Standards Track
Version: 0.0.1
Last Updated: 2010-07-20
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
This document in other formats: XML  PDF


Appendix B: Author Information

Kevin Smith

Email: kevin@kismith.co.uk
JabberID: kevin@doomsong.co.uk


Appendix C: Legal Notices

Copyright

This XMPP Extension Protocol is copyright (c) 2010 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the XMPP Standards Foundation or the authors of this Specification be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising out of the use or inability to use the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which may be found at <http://www.xmpp.org/extensions/ipr-policy.shtml> or obtained by writing to XSF, P.O. Box 1641, Denver, CO 80201 USA).

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.


Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.

Errata can be sent to <editor@xmpp.org>.


Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".


Appendix G: Notes

1. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.

2. XEP-0053: XMPP Registrar Function <http://xmpp.org/extensions/xep-0053.html>.


Appendix H: Revision History

Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/

Version 0.0.1 (2010-07-20)

First draft.

(kis)

END