Abstract: | This specification defines a method for indicating that a message contains content which describes an earlier message in the conversation and should be grouped with the earlier message. |
Authors: | Sam Whited, Craig Petchell |
Copyright: | © 1999 – 2017 XMPP Standards Foundation. SEE LEGAL NOTICES. |
Status: | Experimental |
Type: | Standards Track |
Version: | 0.1 |
Last Updated: | 2015-12-15 |
WARNING: This Standards-Track document is Experimental. Publication as an XMPP Extension Protocol does not imply approval of this proposal by the XMPP Standards Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems are advised to carefully consider whether it is appropriate to deploy implementations of this protocol before it advances to a status of Draft.
1. Introduction
2. Discovering support
3. Usage
4. Business Rules
5. Security Considerations
6. IANA Considerations
7. XMPP Registrar Considerations
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
Many messaging applications send special messages which include more information about a previous message. For example, when sending a link the service may display the description or an image off the page, or users may respond to a message with a "sticker" or an "emotion" which they wish to display alongside the message, even though the conversation has moved on.
This specification defines a way by which one can indicate that a message is logically (and visibly) "attached" to an earlier message in the conversation.
If a client implements message attaching, it MUST specify the 'urn:xmpp:message-attaching:0' feature in its service discovery information features as specified in Service Discovery (XEP-0030) [1] and the Entity Capabilities profile specified in Entity Capabilities (XEP-0115) [2].
<iq type='get' from='alonso@naples.lit/ship' id='miuARo9V'> <query xmlns='http://jabber.org/protocol/disco#info'/> </iq>
<iq type='result' to='alonso@naples.lit/ship' from='naples.lit' id='miuARo9V'> <query xmlns='http://jabber.org/protocol/disco#info'> … <feature var='urn:xmpp:message-attaching:0'/> … </query> </iq>
Messages that are attached to other messages MUST contain an <attach-to/> element qualified by the 'urn:xmpp:message-attaching:0' namespace and with an 'id' attribute set to the ID of the message that we want to attach to. Messages MAY be attached to any other message, including those sent by other clients, but clients MAY choose to ignore the attach-to directive and display the message normally.
<message to='antonio@milan.lit/ship' from='prospero@milan.lit/island id='RgEGnjqy'> <body>storm.png</body> <attach-to id='oldmessage1' xmlns='urn:xmpp:message-attaching:0'/> </message>
Note that indicating that a message should be "attached" to an earlier message in the conversation is merely a suggestion to the client to display the message next to or below the old message.
A receiving client MAY choose to show the attached message next to or below the indicated message in whatever display is used for messages or can choose to display the attachment in another way (including as a normal message, completely ignoring the attach-to element).
A receiving client SHOULD indicate that the message is an attachment, and not a part of the original message to prevent confusion.
<attach-to/> elements MUST NOT be put on any stanza type other than messages.
A server may choose to strip some <attach-to/> messages based on local policy (eg. a server might have a policy that only it can create message attachments).
Clients MUST send ids on messages if they support attachments.
Messages MUST NOT contain more than one <attach-to/> element.
Clients and servers MUST NOT include an <attach-to/> element on messages with a non-messaging payload unless they are including it on an error which may be attached to the message that caused the error to be generated.
Clients that implement message attachments MUST be careful not to display the attachments in such a way that they could be confused with the original message and cause someone viewing the conversation to assume they were sent by the sender of the message being attached to.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [3].
This specification defines the following XML namespaces:
The XMPP Registrar [4] shall include the foregoing namespaces in its disco features registry as defined in Service Discovery (XEP-0030) [1].
<var> <name>urn:xmpp:message-attaching:0</name> <desc>Indicates support for attaching one message to another.</desc> <doc>XEP-xxxx</doc> </var>
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:xmpp:message-attaching:0' xmlns='urn:xmpp:message-attaching:0' elementFormDefault='qualified'> <xs:element name='attach-to'> <xs:complexType> <xs:simpleContent> <xs:extension base='xs:string'> <xs:attribute name='id' type='xs:string' use='required'/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:schema>
Series: XEP
Number: 0367
Publisher: XMPP Standards Foundation
Status:
Experimental
Type:
Standards Track
Version: 0.1
Last Updated: 2015-12-15
Approving Body: XMPP Council
Dependencies: XMPP Core
Supersedes: None
Superseded By: None
Short Name: message-attaching
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
sam@samwhited.com
JabberID:
sam@samwhited.com
URI:
https://blog.samwhited.com/
Email:
cpetchell@atlassian.com
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.
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>.
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".
1. XEP-0030: Service Discovery <https://xmpp.org/extensions/xep-0030.html>.
2. XEP-0115: Entity Capabilities <https://xmpp.org/extensions/xep-0115.html>.
3. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
4. 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 <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Initial published version approved by the XMPP Council.
(XEP Editor (asw))First draft.
(ssw)END