[ejabberd] xep-0223 Persistent Storage of Private Data via PubSub

kael ka-el at laposte.net
Wed Jan 20 15:31:10 MSK 2010


On 01/19/2010 10:52 PM, Pablo Platt wrote:
> Is there a way I can define a whitelist and set the node to be 
> persistent without 'publish-options'?

You can create and configure a node simultaneously before publishing items :

<iq type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
   <create node='storage:bookmarks'/>
   <configure>
    <x xmlns='jabber:x:data' type='submit'>
     <field var='FORM_TYPE' type='hidden'>
      <value>http://jabber.org/protocol/pubsub#node_config</value>
     </field>
     <field var='pubsub#persist_items'><value>1</value></field>
     <field var='pubsub#access_model'><value>whitelist</value></field>
    </x>
   </configure>
  </pubsub>
</iq>


cf. <http://xmpp.org/extensions/xep-0060.html#owner-create-and-configure>


Or configure an already created node :

<iq type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
   <configure node='storage:bookmarks'>
    <x xmlns='jabber:x:data' type='submit'>
     <field var='FORM_TYPE' type='hidden'>
      <value>http://jabber.org/protocol/pubsub#node_config</value>
     </field>
     <field var='pubsub#persist_items'><value>1</value></field>
     <field var='pubsub#access_model'><value>whitelist</value></field>
    </x>
   </configure>
  </pubsub>
</iq>


cf. <http://xmpp.org/extensions/xep-0060.html#owner-configure-submit>


-- 
kael



More information about the ejabberd mailing list