No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0367.xml 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Message Attaching</title>
  10. <abstract>
  11. This specification defines a method for indicating that a message contains
  12. content which describes an earlier message in the conversation and should
  13. be grouped with the earlier message.
  14. </abstract>
  15. &LEGALNOTICE;
  16. <number>0367</number>
  17. <status>Deferred</status>
  18. <type>Standards Track</type>
  19. <sig>Standards</sig>
  20. <approver>Council</approver>
  21. <dependencies>
  22. <spec>XMPP Core</spec>
  23. </dependencies>
  24. <supersedes/>
  25. <supersededby/>
  26. <shortname>message-attaching</shortname>
  27. &sam;
  28. <author>
  29. <firstname>Craig</firstname>
  30. <surname>Petchell</surname>
  31. <email>cpetchell@atlassian.com</email>
  32. </author>
  33. <revision>
  34. <version>0.2</version>
  35. <date>2017-09-11</date>
  36. <initials>XEP Editor (jwi)</initials>
  37. <remark>Defer due to lack of activity.</remark>
  38. </revision>
  39. <revision>
  40. <version>0.1</version>
  41. <date>2015-12-15</date>
  42. <initials>XEP Editor (asw)</initials>
  43. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.0.1</version>
  47. <date>2015-10-16</date>
  48. <initials>ssw</initials>
  49. <remark><p>First draft.</p></remark>
  50. </revision>
  51. </header>
  52. <section1 topic='Introduction' anchor='intro'>
  53. <p>
  54. Many messaging applications send special messages which include more
  55. information about a previous message. For example, when sending a link the
  56. service may display the description or an image off the page, or users may
  57. respond to a message with a "sticker" or an "emotion" which they wish to
  58. display alongside the message, even though the conversation has moved on.
  59. </p>
  60. <p>
  61. This specification defines a way by which one can indicate that a message
  62. is logically (and visibly) "attached" to an earlier message in the
  63. conversation.
  64. </p>
  65. </section1>
  66. <section1 topic='Discovering support' anchor='disco'>
  67. <p>
  68. If a client implements message attaching, it MUST specify the
  69. 'urn:xmpp:message-attaching:0' feature in its service discovery information
  70. features as specified in &xep0030; and the Entity Capabilities profile
  71. specified in &xep0115;.
  72. </p>
  73. <example caption='Client requests information about a chat partner&apos;s client'><![CDATA[
  74. <iq type='get'
  75. from='alonso@naples.lit/ship'
  76. id='miuARo9V'>
  77. <query xmlns='http://jabber.org/protocol/disco#info'/>
  78. </iq>]]></example>
  79. <example caption='Partner&apos;s client advertises support for attaching'><![CDATA[
  80. <iq type='result'
  81. to='alonso@naples.lit/ship'
  82. from='naples.lit'
  83. id='miuARo9V'>
  84. <query xmlns='http://jabber.org/protocol/disco#info'>
  85. <feature var='urn:xmpp:message-attaching:0'/>
  86. </query>
  87. </iq>]]></example>
  88. </section1>
  89. <section1 topic='Usage' anchor='usage'>
  90. <p>
  91. Messages that are attached to other messages MUST contain an
  92. &lt;attach-to/&gt; element qualified by the 'urn:xmpp:message-attaching:0'
  93. namespace and with an 'id' attribute set to the ID of the message that we
  94. want to attach to. Messages MAY be attached to any other message, including
  95. those sent by other clients, but clients MAY choose to ignore the attach-to
  96. directive and display the message normally.
  97. </p>
  98. <example caption='User attaches a message'><![CDATA[
  99. <message to='antonio@milan.lit/ship' from='prospero@milan.lit/island id='RgEGnjqy'>
  100. <body>storm.png</body>
  101. <attach-to id='oldmessage1' xmlns='urn:xmpp:message-attaching:0'/>
  102. </message>]]></example>
  103. <p>
  104. Note that indicating that a message should be "attached" to an earlier
  105. message in the conversation is merely a suggestion to the client to display
  106. the message next to or below the old message.
  107. </p>
  108. </section1>
  109. <section1 topic='Business Rules' anchor='rules'>
  110. <p>
  111. A receiving client MAY choose to show the attached message next to or below
  112. the indicated message in whatever display is used for messages or can
  113. choose to display the attachment in another way (including as a normal
  114. message, completely ignoring the attach-to element).
  115. </p>
  116. <p>
  117. A receiving client SHOULD indicate that the message is an attachment, and
  118. not a part of the original message to prevent confusion.
  119. </p>
  120. <p>
  121. &lt;attach-to/&gt; elements MUST NOT be put on any stanza type other than
  122. messages.
  123. </p>
  124. <p>
  125. A server may choose to strip some &lt;attach-to/&gt; messages based on
  126. local policy (eg. a server might have a policy that only it can create
  127. message attachments).
  128. </p>
  129. <p>Clients MUST send ids on messages if they support attachments.</p>
  130. <p>
  131. Messages MUST NOT contain more than one &lt;attach-to/&gt; element.
  132. </p>
  133. <p>
  134. Clients and servers MUST NOT include an &lt;attach-to/&gt; element on
  135. messages with a non-messaging payload unless they are including it on an
  136. error which may be attached to the message that caused the error to be
  137. generated.
  138. </p>
  139. </section1>
  140. <section1 topic='Security Considerations' anchor='security'>
  141. <p>
  142. Clients that implement message attachments MUST be careful not to display
  143. the attachments in such a way that they could be confused with the original
  144. message and cause someone viewing the conversation to assume they were sent
  145. by the sender of the message being attached to.
  146. </p>
  147. </section1>
  148. <section1 topic='IANA Considerations' anchor='iana'>
  149. <p>This document requires no interaction with &IANA;.</p>
  150. </section1>
  151. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  152. <p>This specification defines the following XML namespaces:</p>
  153. <ul>
  154. <li>urn:xmpp:message-attaching:0</li>
  155. </ul>
  156. <p>
  157. The &REGISTRAR; shall include the foregoing namespaces in its disco
  158. features registry as defined in &xep0030;.
  159. </p>
  160. <code caption='Registry Submission'><![CDATA[
  161. <var>
  162. <name>urn:xmpp:message-attaching:0</name>
  163. <desc>Indicates support for attaching one message to another.</desc>
  164. <doc>XEP-xxxx</doc>
  165. </var>
  166. ]]></code>
  167. </section1>
  168. <section1 topic='XML Schema' anchor='schema'>
  169. <code><![CDATA[
  170. <?xml version='1.0' encoding='UTF-8'?>
  171. <xs:schema
  172. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  173. targetNamespace='urn:xmpp:message-attaching:0'
  174. xmlns='urn:xmpp:message-attaching:0'
  175. elementFormDefault='qualified'>
  176. <xs:element name='attach-to'>
  177. <xs:complexType>
  178. <xs:simpleContent>
  179. <xs:extension base='xs:string'>
  180. <xs:attribute name='id' type='xs:string' use='required'/>
  181. </xs:extension>
  182. </xs:simpleContent>
  183. </xs:complexType>
  184. </xs:element>
  185. </xs:schema>
  186. ]]></code>
  187. </section1>
  188. </xep>