[Standards] XEP-0060: acknowledgement of subscribe + configure

Peter Saint-Andre stpeter at stpeter.im
Mon Mar 24 22:33:15 UTC 2008


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='francisco at denmark.lit/barracks'
    to='pubsub.shakespeare.lit'
    id='sub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <subscribe node='princely_musings' jid='francisco at denmark.lit'/>
    <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='francisco at denmark.lit/barracks'
    id='sub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <subscription
        node='princely_musings'
        jid='francisco at denmark.lit'
        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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20080324/5f91186b/attachment.bin>


More information about the Standards mailing list