XEP-0369: Allow unsubscribing from nodes.

The <update-subscription/> element so far was only allowing a user to
subscribe to new nodes, not unsubscribe from them.  The only option if
for instance one node was too floody was to leave the channel and rejoin
it with only the nodes we wanted.
This commit is contained in:
Emmanuel Gil Peyrot 2020-03-27 12:19:52 +01:00
parent 85ccb1e796
commit bb05bddeab
1 changed files with 3 additions and 1 deletions

View File

@ -1080,7 +1080,7 @@
</p>
<p>
A user MAY subsequently modify subscription to nodes in a channel by sending a subscription modification request encoded as a &lt;update-subscription/&gt; child element of &lt;iq/&gt; element. The &lt;update-subscription/&gt; element is qualified by the 'urn:xmpp:mix:core:1' namespace. The requested nodes are encoded as &lt;subscribe/&gt; child elements of the &lt;update-subscription/&gt; element with the node name encoded as a 'node' attribute. This modification goes directly from client to the MIX channel, as this change does not impact the roster and so does not need any local action. The following example shows subscription modification.
A user MAY subsequently modify subscription to nodes in a channel by sending a subscription modification request encoded as a &lt;update-subscription/&gt; child element of &lt;iq/&gt; element. The &lt;update-subscription/&gt; element is qualified by the 'urn:xmpp:mix:core:1' namespace. The requested nodes are encoded as &lt;subscribe/&gt; and &lt;unsubscribe/&gt; child elements of the &lt;update-subscription/&gt; element with the node name encoded as a 'node' attribute. This modification goes directly from client to the MIX channel, as this change does not impact the roster and so does not need any local action. The following example shows subscription modification.
</p>
<example caption="User Modifies Subscription Request"><![CDATA[
<iq type='set'
@ -1089,6 +1089,7 @@
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<update-subscription xmlns='urn:xmpp:mix:core:1'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<unsubscribe node='urn:xmpp:mix:nodes:presence'/>
</update-subscription>
</iq>
@ -1099,6 +1100,7 @@
<update-subscription xmlns='urn:xmpp:mix:core:1'
jid='hag66@shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<unsubscribe node='urn:xmpp:mix:nodes:presence'/>
</update-subscription>
</iq>
]]></example>