Update spoilers protoxep based on feedback from ML

Fixes #282
This commit is contained in:
theSouL 2016-11-05 06:18:28 +01:00 committed by Sam Whited
parent 33d082b6c5
commit f098d8ecf0
1 changed files with 54 additions and 46 deletions

View File

@ -37,7 +37,7 @@
<jid>vaulor@blastersklan.com</jid>
</author>
<revision>
<version>0.0.1</version>
<version>0.0.2</version>
<date>2016-10-31</date>
<initials>sfp, xfp</initials>
<remark><p>First draft.</p></remark>
@ -69,63 +69,71 @@
specified in &xep0115;.
</p>
<example caption='Client requests information about a chat partner&apos;s client'><![CDATA[
<iq type='get'
from='romeo@montague.net/orchard'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
<iq from='romeo@montague.net/orchard'
id='disco1'
to='juliet@capulet.lit/balcony'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Partner&apos;s client advertises support for spoiler messages'><![CDATA[
<iq type='result'
to='romeo@montague.net/orchard'
from='montague.net'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:spoiler:0'/>
</query>
<iq to='romeo@montague.net/orchard'
id='disco1'
from='juliet@capulet.lit/balcony'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='urn:xmpp:spoiler:0'/>
</query>
</iq>]]></example>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<p>
Messages user wants to be sent as spoilers, MUST contain an
&lt;spoiler&gt; element qualified by the 'urn:xmpp:spoiler:0' namespace
and optionally, &lt;spoiler&gt; elements may possess a 'hint' attribute
that warns about the topic of the spoiler message.
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'
attribute.
</p>
<example caption='User sends a spoiler message without the hint attribute'><![CDATA[
<example caption='User sends a spoiler message without the hint'><![CDATA[
<message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' 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'/>
</message>
]]></example>
<example caption='User sends a spoiler message with the hint attribute'><![CDATA[
<example caption='User sends a spoiler message with the hint'><![CDATA[
<message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler2'>
<body>And at the end of the story, both of them die! It is so tragic!</body>
<spoiler hint='Love story end' xmlns='urn:xmpp:spoiler:0'/>
<spoiler xmlns='urn:xmpp:spoiler:0'>Love story end</spoiler>
</message>
]]></example>
</section1>
<example caption='User sends a spoiler message with the hint in two languages'><![CDATA[
<message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' id='spoiler3'>
<body>holidays.png</body>
<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>
</message>
]]></example>
<example caption='User sends a spoiler message with the hint and body in two languages'><![CDATA[
<message to='romeo@montague.net/orchard' from='juliet@capulet.net/balcony' 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>
</message>
]]></example>
</section1>
<section1 topic='Business Rules' anchor='rules'>
<p>
It MUST be clear a message is in fact a spoiler and its content MUST only
be displayed upon user's request.
</p>
<p>
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).
</p>
<p>
Clients SHOULD display spoiler's hint, if any, before showing message's
content.
</p>
<p>
Clients MAY display spoiler's hint even after showing message's content
(e.g. as a header or title of the message).
</p>
<p>
Users SHOULD be able to uncover or hide a spoiler message at will,
anytime.
<ol>
<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>
</ol>
</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
@ -152,7 +160,7 @@
<code caption='Registration'><![CDATA[
<var>
<name>urn:xmpp:spoiler:0</name>
<desc>Indicates that a message should be hidden by default.</desc>
<desc>Indicates that a message's content should not be displayed by default.</desc>
<doc>xxxx</doc>
</var>
]]></code>
@ -163,16 +171,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:spoiler:0'
xmlns='urn:xmpp:spoiler:0'
elementFormDefault='qualified'>
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:spoiler:0'
xmlns='urn:xmpp:spoiler:0'
elementFormDefault='qualified'>
<xs:element name='spoiler'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute name='hint' type='xs:string'/>
<xs:attribute ref='xml:lang' use='optional'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>