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-0382.xml 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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>Spoiler messages</title>
  10. <abstract>
  11. This specification defines an XMPP protocol extension that provides a
  12. method for indicating a message is a spoiler and should be displayed as
  13. such.
  14. </abstract>
  15. &LEGALNOTICE;
  16. <number>0382</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>spoilers</shortname>
  27. <author>
  28. <firstname>Severino</firstname>
  29. <surname>Ferrer de la Peñita</surname>
  30. <email>soul@blastersklan.com</email>
  31. <jid>soul@blastersklan.com</jid>
  32. </author>
  33. <author>
  34. <firstname>Xavier</firstname>
  35. <surname>Ferrer de la Peñita</surname>
  36. <email>vaulor@openmailbox.org</email>
  37. <jid>vaulor@blastersklan.com</jid>
  38. </author>
  39. <revision>
  40. <version>0.2.0</version>
  41. <date>2018-01-25</date>
  42. <initials>XEP Editor (jwi)</initials>
  43. <remark>Defer due to lack of activity.</remark>
  44. </revision>
  45. <revision>
  46. <version>0.1</version>
  47. <date>2016-12-07</date>
  48. <initials>XEP Editor: ssw</initials>
  49. <remark><p>Initial version approved by the council.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.0.2</version>
  53. <date>2016-10-31</date>
  54. <initials>sfp, xfp</initials>
  55. <remark><p>First draft.</p></remark>
  56. </revision>
  57. </header>
  58. <section1 topic='Introduction' anchor='intro'>
  59. <p>
  60. Sometimes, people have the need to send large texts related to the current
  61. topic but because of their length, make it hard to follow the conversation
  62. (specially on mobile devices). On other occasions, people may want to
  63. discuss or just make a little quick comment related to a film or a book in
  64. a conversation with multiple people that may or may not know the plot.
  65. Also, every now and then, people may want to send a private message (in
  66. the sense that people near the receiver must not be able to read) or
  67. inline images to someone is known is in a public enviroment like
  68. libraries, coffehouses, bars, etc.
  69. </p>
  70. <p>
  71. This specification defines a way to indicate message's content does not
  72. have to be displayed until receiver requests to do so.
  73. </p>
  74. </section1>
  75. <section1 topic='Discovering support' anchor='disco'>
  76. <p>
  77. If a client implements spoiler messages, it MUST specify the
  78. 'urn:xmpp:spoiler:0' feature in its service discovery information
  79. features as specified in &xep0030; and the Entity Capabilities profile
  80. specified in &xep0115;.
  81. </p>
  82. <example caption='Client requests information about a chat partner&apos;s client'><![CDATA[
  83. <iq from='romeo@montague.net/orchard'
  84. id='disco1'
  85. to='juliet@capulet.lit/balcony'
  86. type='get'>
  87. <query xmlns='http://jabber.org/protocol/disco#info'/>
  88. </iq>]]></example>
  89. <example caption='Partner&apos;s client advertises support for spoiler messages'><![CDATA[
  90. <iq to='romeo@montague.net/orchard'
  91. id='disco1'
  92. from='juliet@capulet.lit/balcony'
  93. type='result'>
  94. <query xmlns='http://jabber.org/protocol/disco#info'>
  95. <feature var='urn:xmpp:spoiler:0'/>
  96. </query>
  97. </iq>]]></example>
  98. </section1>
  99. <section1 topic='Use Cases' anchor='usecases'>
  100. <p>
  101. Messages user wants to be sent as spoilers, MUST contain a &lt;spoiler&gt; element qualified by the
  102. 'urn:xmpp:spoiler:0' namespace and optionally, &lt;spoiler&gt; elements may contain character data as
  103. a hint that warns about the topic of the spoiler message. They may also possess the 'xml:lang'
  104. attribute.
  105. </p>
  106. <example caption='User sends a spoiler message without the hint'><![CDATA[
  107. <message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler1'>
  108. <body>This is a very long message so I'm going to hide inside a spoiler [...] </body>
  109. <spoiler xmlns='urn:xmpp:spoiler:0'/>
  110. </message>
  111. ]]></example>
  112. <example caption='User sends a spoiler message with the hint'><![CDATA[
  113. <message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler2'>
  114. <body>And at the end of the story, both of them die! It is so tragic!</body>
  115. <spoiler xmlns='urn:xmpp:spoiler:0'>Love story end</spoiler>
  116. </message>
  117. ]]></example>
  118. <example caption='User sends a spoiler message with the hint in two languages'><![CDATA[
  119. <message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler3'>
  120. <body>holidays.png</body>
  121. <spoiler xml:lang='en' xmlns='urn:xmpp:spoiler:0'>Trip to the beach</spoiler>
  122. <spoiler xml:lang='ca' xmlns='urn:xmpp:spoiler:0'>Viatge a la platja</spoiler>
  123. </message>
  124. ]]></example>
  125. <example caption='User sends a spoiler message with the hint and body in two languages'><![CDATA[
  126. <message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler4'>
  127. <body xml:lang='en'>And at the end of the story, both of them die! It is so tragic!</body>
  128. <body xml:lang='ca'>I al final de la història, els dos moren! És tan tràgic!</body>
  129. <spoiler xml:lang='en' xmlns='urn:xmpp:spoiler:0'>Love story end</spoiler>
  130. <spoiler xml:lang='ca' xmlns='urn:xmpp:spoiler:0'>Fi de la història d'amor</spoiler>
  131. </message>
  132. ]]></example>
  133. </section1>
  134. <section1 topic='Business Rules' anchor='rules'>
  135. <ol>
  136. <li>It MUST be clear that a message is in fact a spoiler and its content MUST only be displayed upon
  137. user's request.</li>
  138. <li>Clients MAY provide a way to display spoilers always uncovered, without the need of interaction
  139. by the user (e.g. in the client's settings).</li>
  140. <li>Clients SHOULD display spoiler's hint, if any, before showing message's content.</li>
  141. <li>Clients MAY display spoiler's hint even after showing message's content (e.g. as a header or
  142. title of the message).</li>
  143. <li>Users SHOULD uncover or hide a spoiler message at will, anytime.</li>
  144. </ol>
  145. </section1>
  146. <section1 topic='Security Considerations' anchor='security'>
  147. <p>
  148. This document introduces no additional security considerations above and
  149. beyond those defined in the documents on which it depends.
  150. </p>
  151. </section1>
  152. <section1 topic='IANA Considerations' anchor='iana'>
  153. <p>This document requires no interaction with &IANA;.</p>
  154. </section1>
  155. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  156. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  157. <p>This specification defines the following XML namespace:</p>
  158. <ul>
  159. <li>'urn:xmpp:spoiler:0'</li>
  160. </ul>
  161. <p>
  162. Upon advancement of this specification to draft status, the &REGISTRAR;
  163. shall include the foregoing namespaces in its registry of protocol
  164. namespaces &NAMESPACES; and in its disco features registry
  165. &DISCOFEATURES; as defined in &xep0030;.
  166. </p>
  167. <code caption='Registration'><![CDATA[
  168. <var>
  169. <name>urn:xmpp:spoiler:0</name>
  170. <desc>Indicates that a message's content should not be displayed by default.</desc>
  171. <doc>0382</doc>
  172. </var>
  173. ]]></code>
  174. </section2>
  175. </section1>
  176. <section1 topic='XML Schema' anchor='schema'>
  177. <code><![CDATA[
  178. <?xml version='1.0' encoding='UTF-8'?>
  179. <xs:schema
  180. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  181. targetNamespace='urn:xmpp:spoiler:0'
  182. xmlns='urn:xmpp:spoiler:0'
  183. elementFormDefault='qualified'>
  184. <xs:element name='spoiler'>
  185. <xs:complexType>
  186. <xs:simpleContent>
  187. <xs:extension base='xs:string'>
  188. <xs:attribute ref='xml:lang' use='optional'/>
  189. </xs:extension>
  190. </xs:simpleContent>
  191. </xs:complexType>
  192. </xs:element>
  193. </xs:schema>
  194. ]]></code>
  195. </section1>
  196. </xep>