mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
Take standards@ feedback into account
This commit is contained in:
parent
63715d1254
commit
5fe1b6fb16
94
xep-0444.xml
94
xep-0444.xml
@ -75,19 +75,20 @@
|
||||
</p>
|
||||
</section1>
|
||||
<section1 topic='Discovering support' anchor='disco'>
|
||||
<p>
|
||||
If a client implements message reactions, it MUST specify the
|
||||
'urn:xmpp:reactions:0' feature in its service discovery information features
|
||||
as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.
|
||||
</p>
|
||||
<example caption='Client requests information about a chat partner's client'><![CDATA[
|
||||
<section2 topic="Basic support" anchor="disco-base">
|
||||
<p>
|
||||
If a client implements message reactions, it MUST specify the
|
||||
'urn:xmpp:reactions:0' feature in its service discovery information features
|
||||
as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.
|
||||
</p>
|
||||
<example caption='Client requests information about a chat partner's client'><![CDATA[
|
||||
<iq type='get'
|
||||
to='romeo@montague.lit/orchard'
|
||||
from='juliet@capulet.lit/balcony'
|
||||
id='info1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||
</iq>]]></example>
|
||||
<example caption='Partner's client advertises support for reactions'><![CDATA[
|
||||
<example caption='Partner's client advertises support for reactions'><![CDATA[
|
||||
<iq type='result'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
from='romeo@montague.lit/orchard'
|
||||
@ -97,7 +98,48 @@
|
||||
<feature var='urn:xmpp:reactions:0'/>
|
||||
...
|
||||
</query>
|
||||
</iq>]]></example>
|
||||
</section2>
|
||||
<section2 topic="Restricted reactions" anchor="disco-restricted">
|
||||
<p>
|
||||
In some cases, only a limited number and/or subset
|
||||
of emojis are allowed to react to a message.
|
||||
This is particularly useful in the context of gateways to other chat
|
||||
networks that are not as permissive about which and how many emojis
|
||||
can be used for message reactions.
|
||||
MUC components may also allow room admins to restrict the subset and/or number
|
||||
of emojis per message.
|
||||
</p>
|
||||
<p>
|
||||
To allow clients to adapt their UIs, entities that have such restrictions in place
|
||||
SHOULD advertise it with &xep0128; in a &xep0004; using the
|
||||
'urn:xmpp:reactions:0:restrictions' namespace as FORM_TYPE.
|
||||
</p>
|
||||
<example caption='Entities advertises support for restricted reactions'><![CDATA[
|
||||
<iq type='result'
|
||||
to='juliet@capulet.lit/balcony'
|
||||
from='romeo@montague.lit/orchard'
|
||||
id='info1'>
|
||||
<query xmlns='http://jabber.org/protocol/disco#info'>
|
||||
...
|
||||
<feature var='urn:xmpp:reactions:0'/>
|
||||
<x xmlns='jabber:x:data' type='result'>
|
||||
<field var='FORM_TYPE' type='hidden'>
|
||||
<value>urn:xmpp:reactions:0:restrictions</value>
|
||||
</field>
|
||||
<field var='max_reactions_per_user'>
|
||||
<value>1</value>
|
||||
</field>
|
||||
<field var='allowlist'>
|
||||
<value>💘</value>
|
||||
<value>❤️</value>
|
||||
<value>💜</value>
|
||||
</field>
|
||||
</x>
|
||||
...
|
||||
</query>
|
||||
</iq>]]></example>
|
||||
</section2>
|
||||
</section1>
|
||||
<section1 topic='Use Cases' anchor='usecases'>
|
||||
<section2 topic="Sending reactions to a message" anchor="sending-reactions">
|
||||
@ -146,15 +188,11 @@
|
||||
<store xmlns="urn:xmpp:hints"/>
|
||||
</message>]]></example>
|
||||
</section2>
|
||||
<section2 topic="Rejecting a reaction" anchor="restricting-reactions">
|
||||
<section2 topic="Rejecting a reaction" anchor="rejecting">
|
||||
<p>
|
||||
In some cases, only a limited number and/or subset
|
||||
of emojis are allowed to react to a message.
|
||||
This is particularly useful in the context of gateways to other chat
|
||||
networks that are not as permissive about which and how many emojis
|
||||
can be used for message reactions.
|
||||
MUC components may also allow room admins to restrict the subset and/or number
|
||||
of emojis per message.
|
||||
Entities implementing reaction restrictions MUST reply to invalid reactions payloads
|
||||
with a message type="error" containing a 'not-acceptable' error.
|
||||
The error payload SHOULD contain a human-readable text message explaining the reaction rules.
|
||||
</p>
|
||||
<example caption="Romeo sends a message"><![CDATA[
|
||||
<message from="romeo@legacy-love-network.capulet.net"
|
||||
@ -174,9 +212,6 @@
|
||||
</reactions>
|
||||
<store xmlns="urn:xmpp:hints"/>
|
||||
</message>]]></example>
|
||||
<p>
|
||||
In this case, the recipient (or any intermediary node) MUST reject the reaction-containing message.
|
||||
</p>
|
||||
<example caption="Romeo rejects the reactions"><![CDATA[
|
||||
<message from="romeo@legacy-love-network.capulet.net"
|
||||
to="juliet@capulet.net"
|
||||
@ -191,27 +226,8 @@
|
||||
</error>
|
||||
</message>]]></example>
|
||||
<p>
|
||||
When receiving this kind of error message, the reaction-sending entity MUST consider that its emoji reactions
|
||||
to this message are now void.
|
||||
</p>
|
||||
<p>
|
||||
Optionally, an error message can contain a reactions element, listing the subset of emojis that were valid in
|
||||
the original reactions message.
|
||||
</p>
|
||||
<example caption="Romeo removes a subset of reactions"><![CDATA[
|
||||
<message from="romeo@legacy-love-network.capulet.net"
|
||||
to="juliet@capulet.net"
|
||||
type="error"
|
||||
id="will-be-rejected1">
|
||||
<error xmlns="jabber:client" type="modify">
|
||||
<not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
|
||||
<reactions id='restricted-reactions-1' xmlns='urn:xmpp:reactions:0'>
|
||||
<reaction>💘</reaction>
|
||||
</reactions>
|
||||
</error>
|
||||
</message>]]></example>
|
||||
<p>
|
||||
In this case, the reaction-sending entity MUST modify the emojis accordingly.
|
||||
When receiving this error message, the reaction-sending entity MUST revert the "message reactions"
|
||||
to its previous state in its user interface.
|
||||
</p>
|
||||
</section2>
|
||||
</section1>
|
||||
|
Loading…
Reference in New Issue
Block a user