mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 23:28:51 -05:00
parent
33d082b6c5
commit
f098d8ecf0
@ -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'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'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
|
||||
<spoiler> element qualified by the 'urn:xmpp:spoiler:0' namespace
|
||||
and optionally, <spoiler> 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 <spoiler> element qualified by the
|
||||
'urn:xmpp:spoiler:0' namespace and optionally, <spoiler> 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>
|
||||
|
Loading…
Reference in New Issue
Block a user