Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Spoiler messages</title>
This specification defines an XMPP protocol extension that provides a
method for indicating a message is a spoiler and should be displayed as
<type>Standards Track</type>
<spec>XMPP Core</spec>
<surname>Ferrer de la Peñita</surname>
<surname>Ferrer de la Peñita</surname>
<initials>XEP Editor (jwi)</initials>
<remark>Defer due to lack of activity.</remark>
<initials>XEP Editor: ssw</initials>
<remark><p>Initial version approved by the council.</p></remark>
<initials>sfp, xfp</initials>
<remark><p>First draft.</p></remark>
<section1 topic='Introduction' anchor='intro'>
Sometimes, people have the need to send large texts related to the current
topic but because of their length, make it hard to follow the conversation
(specially on mobile devices). On other occasions, people may want to
discuss or just make a little quick comment related to a film or a book in
a conversation with multiple people that may or may not know the plot.
Also, every now and then, people may want to send a private message (in
the sense that people near the receiver must not be able to read) or
inline images to someone is known is in a public enviroment like
libraries, coffehouses, bars, etc.
This specification defines a way to indicate message's content does not
have to be displayed until receiver requests to do so.
<section1 topic='Discovering support' anchor='disco'>
If a client implements spoiler messages, it MUST specify the
'urn:xmpp:spoiler:0' feature in its service discovery information
features as specified in &xep0030; and the Entity Capabilities profile
specified in &xep0115;.
<example caption='Client requests information about a chat partner&apos;s client'><![CDATA[
<iq from=''
<query xmlns=''/>
<example caption='Partner&apos;s client advertises support for spoiler messages'><![CDATA[
<iq to=''
<query xmlns=''>
<feature var='urn:xmpp:spoiler:0'/>
<section1 topic='Use Cases' anchor='usecases'>
Messages user wants to be sent as spoilers, MUST contain a &lt;spoiler&gt; element qualified by the
'urn:xmpp:spoiler:0' namespace and optionally, &lt;spoiler&gt; elements may contain character data as
a hint that warns about the topic of the spoiler message. They may also possess the 'xml:lang'
<example caption='User sends a spoiler message without the hint'><![CDATA[
<message to='' from='' id='spoiler1'>
<body>This is a very long message so I'm going to hide inside a spoiler [...] </body>
<spoiler xmlns='urn:xmpp:spoiler:0'/>
<example caption='User sends a spoiler message with the hint'><![CDATA[
<message to='' from='' id='spoiler2'>
<body>And at the end of the story, both of them die! It is so tragic!</body>
<spoiler xmlns='urn:xmpp:spoiler:0'>Love story end</spoiler>
<example caption='User sends a spoiler message with the hint in two languages'><![CDATA[
<message to='' from='' id='spoiler3'>
<spoiler xml:lang='en' xmlns='urn:xmpp:spoiler:0'>Trip to the beach</spoiler>
<spoiler xml:lang='ca' xmlns='urn:xmpp:spoiler:0'>Viatge a la platja</spoiler>
<example caption='User sends a spoiler message with the hint and body in two languages'><![CDATA[
<message to='' from='' id='spoiler4'>
<body xml:lang='en'>And at the end of the story, both of them die! It is so tragic!</body>
<body xml:lang='ca'>I al final de la història, els dos moren! És tan tràgic!</body>
<spoiler xml:lang='en' xmlns='urn:xmpp:spoiler:0'>Love story end</spoiler>
<spoiler xml:lang='ca' xmlns='urn:xmpp:spoiler:0'>Fi de la història d'amor</spoiler>
<section1 topic='Business Rules' anchor='rules'>
<li>It MUST be clear that a message is in fact a spoiler and its content MUST only be displayed upon
user's request.</li>
<li>Clients MAY provide a way to display spoilers always uncovered, without the need of interaction
by the user (e.g. in the client's settings).</li>
<li>Clients SHOULD display spoiler's hint, if any, before showing message's content.</li>
<li>Clients MAY display spoiler's hint even after showing message's content (e.g. as a header or
title of the message).</li>
<li>Users SHOULD uncover or hide a spoiler message at will, anytime.</li>
<section1 topic='Security Considerations' anchor='security'>
This document introduces no additional security considerations above and
beyond those defined in the documents on which it depends.
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>This specification defines the following XML namespace:</p>
Upon advancement of this specification to draft status, the &REGISTRAR;
shall include the foregoing namespaces in its registry of protocol
namespaces &NAMESPACES; and in its disco features registry
&DISCOFEATURES; as defined in &xep0030;.
<code caption='Registration'><![CDATA[
<desc>Indicates that a message's content should not be displayed by default.</desc>
<section1 topic='XML Schema' anchor='schema'>
<?xml version='1.0' encoding='UTF-8'?>
<xs:element name='spoiler'>
<xs:extension base='xs:string'>
<xs:attribute ref='xml:lang' use='optional'/>