In XEP-0060, I think it would be good for the pubsub service to "acknowledge" the subscription-related configuration options that are set during subscribe + configure by returning a data form of type result. So:
1. Client sends...
<iq type='set'
from='[EMAIL PROTECTED]/barracks'
to='pubsub.shakespeare.lit'
id='sub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe node='princely_musings' jid='[EMAIL PROTECTED]'/>
<options>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE' type='hidden'>
<value>
http://jabber.org/protocol/pubsub#subscribe_options
</value>
</field>
<field var='pubsub#deliver'><value>1</value></field>
<field var='pubsub#digest'><value>0</value></field>
<field var='pubsub#include_body'><value>false</value></field>
<field var='pubsub#show-values'>
<value>chat</value>
<value>online</value>
<value>away</value>
</field>
</x>
</options>
</pubsub>
</iq>
2. Service returns...
<iq type='result'
from='pubsub.shakespeare.lit'
to='[EMAIL PROTECTED]/barracks'
id='sub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscription
node='princely_musings'
jid='[EMAIL PROTECTED]'
subid='ba49252aaa4f5d320c24d3766f0bdcade78c78d3'
subscription='subscribed'/>
<options>
<x xmlns='jabber:x:data' type='result'>
<field var='FORM_TYPE' type='hidden'>
<value>
http://jabber.org/protocol/pubsub#subscribe_options
</value>
</field>
<field var='pubsub#deliver'><value>1</value></field>
<field var='pubsub#digest'><value>0</value></field>
<field var='pubsub#include_body'><value>false</value></field>
<field var='pubsub#show-values'>
<value>chat</value>
<value>online</value>
<value>away</value>
</field>
</x>
</options>
</pubsub>
</iq>
Right now, the full acknowledgement is not shown in Section 6.3.7 of
XEP-0060, but it seems quite reasonable so that the client knows which
subscription options have been accepted by the service.
Peter
--
Peter Saint-Andre
https://stpeter.im/
smime.p7s
Description: S/MIME Cryptographic Signature
