Hi,
I was trying to set up an XMPP Publish-Subscribe node and to configure it such that when new items are posted to the node, the payload gets automatically delivered to all the subscribers. I tried to configure the node like this:
<pubsub xmlns='[http://jabber.org/protocol/pubsub#owner](http://jabber.org/protocol/pubsub#owner)'> <configure node='mynode'> <x xmlns='jabber:x:data' type='submit'> <field var='pubsub#persist_items'> <value>true</value> </field> <field var='pubsub#deliver_payloads'> <value>true</value> </field> </x> </configure> </pubsub>
But if I then try to post an item to the node, I get an item-forbidden error:
<error code="400" type="modify"> <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> <item-forbidden xmlns="[http://jabber.org/protocol/pubsub#errors](http://jabber.org/protocol/pubsub#errors)"/> </error>
However, if instead of using “true” I use “1” in the configuration, I get no errors:
<pubsub xmlns='[http://jabber.org/protocol/pubsub#owner](http://jabber.org/protocol/pubsub#owner)'> <configure node='mynode'> <x xmlns='jabber:x:data' type='submit'> <field var='pubsub#persist_items'> <value>1</value> </field> <field var='pubsub#deliver_payloads'> <value>1</value> </field> </x>
``
</pubsub>
XEP-0060 clarifies that “implementations MUST support both styles of lexical representation” xmpp.org/extensions/xep-0060.html#nt-id183715.
Why am I getting an “item-forbidden” error if I user “true” in the configuration?
Thanks