1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

Merge branch 'xep-0449' into premerge

This commit is contained in:
Jonas Schäfer 2022-02-15 18:35:09 +01:00
commit 17f235c3da

View File

@ -1,12 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Note to editor:
- Remove xep-sfs entity declared below and change all references from &xep-sfs; to respective &xepXXXX; to refeence sfs when moving to experimental.
- Remove xep-file-metadata entity declared below and change all references from &xep-file-metadata; to respective &xepXXXX; to refeence file metadata when moving to experimental.
-->
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY xep-file-metadata "<span class='ref'><link url='./file-metadata.html'>File metadata element (XEP-xxxx)</link></span> <note>XEP-xxxx: File metadata element &lt;<link url='./file-metadata.html'>https://xmpp.org/extensions/inbox/file-metadata.html</link>&gt;.</note>" >
<!ENTITY xep-sfs "<span class='ref'><link url='./sfs.html'>Stateless file sharing (XEP-xxxx)</link></span> <note>XEP-xxxx: Stateless file sharing &lt;<link url='./sfs.html'>https://xmpp.org/extensions/inbox/sfs.html</link>&gt;.</note>" >
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
<!ENTITY sepl4 "0x1f (ASCII Unit Separator)">
@ -33,6 +26,17 @@ Note to editor:
<supersededby/>
<shortname>stickers</shortname>
&larma;
<revision>
<version>0.1.1</version>
<date>2022-02-10</date>
<initials>egp</initials>
<remark>
<ul>
<li>Replace ProtoXEP references with actual XEP references.</li>
<li>Use XEP-0446s <tt>&lt;descriptions/&gt;</tt> instead of the typod <tt>&lt;description/&gt;</tt>.</li>
</ul>
</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2020-11-24</date>
@ -82,7 +86,7 @@ Note to editor:
The <tt>&lt;pack/&gt;</tt> element MAY include a <tt>&lt;restricted/&gt;</tt> element to indicate that this sticker pack may not be used or imported by other users.
</p>
<p>
The <tt>&lt;pack/&gt;</tt> element contains one or more <tt>&lt;item/&gt;</tt> elements that include details on the stickers in the pack. Each <tt>&lt;item/&gt;</tt> element has <tt>&lt;file/&gt;</tt> element as described in &xep-file-metadata;. The metadata MUST include one or multiple <tt>&lt;hash/&gt;</tt> elements as described in &xep0300;. All stickers in a pack MUST use the same algorithm for their <tt>&lt;hash/&gt;</tt> elements. The metadata MUST include one <tt>&lt;desc/&gt;</tt> element that is not qualified by a <tt>xml:lang</tt> attribute and describes the textual fallback (often an emoji or a sequence of emojis) of the sticker. Each <tt>&lt;item/&gt;</tt> element further has a <tt>&lt;sources/&gt;</tt> element as described in &xep-sfs; describing how to retrieve the image file of the sticker. Each <tt>&lt;item/&gt;</tt> element MAY include one or more <tt>&lt;suggest/&gt;</tt> elements that include a text that clients may replace with the sticker. <tt>&lt;suggest/&gt;</tt> elements MAY have an <tt>xml:lang</tt> attribute.
The <tt>&lt;pack/&gt;</tt> element contains one or more <tt>&lt;item/&gt;</tt> elements that include details on the stickers in the pack. Each <tt>&lt;item/&gt;</tt> element has <tt>&lt;file/&gt;</tt> element as described in &xep0446;. The metadata MUST include one or multiple <tt>&lt;hash/&gt;</tt> elements as described in &xep0300;. All stickers in a pack MUST use the same algorithm for their <tt>&lt;hash/&gt;</tt> elements. The metadata MUST include one <tt>&lt;desc/&gt;</tt> element that is not qualified by a <tt>xml:lang</tt> attribute and describes the textual fallback (often an emoji or a sequence of emojis) of the sticker. Each <tt>&lt;item/&gt;</tt> element further has a <tt>&lt;sources/&gt;</tt> element as described in &xep0447; describing how to retrieve the image file of the sticker. Each <tt>&lt;item/&gt;</tt> element MAY include one or more <tt>&lt;suggest/&gt;</tt> elements that include a text that clients may replace with the sticker. <tt>&lt;suggest/&gt;</tt> elements MAY have an <tt>xml:lang</tt> attribute.
</p>
<p>
Finally, the <tt>&lt;pack/&gt;</tt> element includes a single <tt>&lt;hash/&gt;</tt> element as described in &xep0300;, specifying the hash of the sticker pack. See <link url='#pack-hash'>next section</link> on how such hash is generated.
@ -150,7 +154,7 @@ Note to editor:
<media-type>image/png</media-type>
<desc>👍</desc>
<size>71045</size>
<dimension>512x512</dimension>
<dimensions>512x512</dimensions>
<hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>0AdP8lJOWJrugSKOIAqfEKqFatIpG5JBCjjxY253ojQ=</hash>
</file>
<sources xmlns='urn:xmpp:sfs:0'>
@ -163,7 +167,7 @@ Note to editor:
<media-type>image/png</media-type>
<desc>😘</desc>
<size>67016</size>
<dimension>512x512</dimension>
<dimensions>512x512</dimensions>
<hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>gw+6xdCgOcvCYSKuQNrXH33lV9NMzuDf/s0huByCDsY=</hash>
</file>
<sources xmlns='urn:xmpp:sfs:0'>
@ -180,7 +184,7 @@ Note to editor:
]]></example>
</section2>
<section2 topic='Sending a sticker' anchor='send'>
<p>The sending entity uses &xep-sfs; to send the image file from the sticker pack. The <tt>&lt;item/&gt;</tt>'s <tt>&lt;file/&gt;</tt> and <tt>&lt;sources/&gt;</tt> elements from the sticker pack are used as a template. The sending entity MAY add additional <tt>&lt;hash/&gt;</tt> elements or sources.</p>
<p>The sending entity uses &xep0447; to send the image file from the sticker pack. The <tt>&lt;item/&gt;</tt>'s <tt>&lt;file/&gt;</tt> and <tt>&lt;sources/&gt;</tt> elements from the sticker pack are used as a template. The sending entity MAY add additional <tt>&lt;hash/&gt;</tt> elements or sources.</p>
<p>Additionally, the sending entity adds an element <tt>&lt;sticker/&gt;</tt> to the message. This element carries an attribute <tt>pack</tt> referring to the id of the pubsub item carrying the sticker pack. If the sticker pack resides on a pubsub item other than the senders personal eventing (PEP) node named "urn:xmpp:stickers:0", the sending entity must add additional attributes <tt>jid</tt> and <tt>node</tt>, referring to the jid of the pubsub node and the name of the node, respectively.</p>
<p>The sending entity SHOULD use the <tt>&lt;file/&gt;</tt>'s <tt>&lt;desc/&gt;</tt> content as the message body, except if the sticker was selected based on a suggestion, in which case the content of the corresponding <tt>&lt;suggest/&gt;</tt> SHOULD be used.</p>
<example caption='Sending a sticker'><![CDATA[
@ -192,7 +196,7 @@ Note to editor:
<media-type>image/png</media-type>
<desc>😘</desc>
<size>67016</size>
<dimension>512x512</dimension>
<dimensions>512x512</dimensions>
<hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>gw+6xdCgOcvCYSKuQNrXH33lV9NMzuDf/s0huByCDsY=</hash>
</file>
<sources>
@ -221,7 +225,7 @@ Note to editor:
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>
The security considerations of &xep-sfs; apply.
The security considerations of &xep0447; apply.
</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>