[ejabberd] 403 forbidden error when publishing using pubsub / Setting node configuration

kael ka-el at laposte.net
Fri May 14 13:19:19 MSD 2010


On 05/13/2010 12:59 AM, shahzad bhatti wrote:
> Also, on the server side I am trying to set the configuration of node 
> using exmpp, but my syntax is not quite correct and is failing. Can 
> someone point what's missing?

>     Options =  #xmlel{name = 'x', ns = ?NS_DATA_FORMS, children = [

The <x/> element lacks a 'type' = 'submit' attribute. It should work with :

Options = #xmlel{name = 'x', ns = ?NS_DATA_FORMS,
attrs = [?XMLATTR('type', "submit")], children = [...]},

>       ?XMLEL_LIST_FIELD(<<"pubsub#access_model">>, <<"authorize">>),
>       ?XMLEL_LIST_FIELD(<<"pubsub#publish_model">>, <<"publishers">>),
>       ?XMLEL_BOOL_FIELD(<<"pubsub#notify_sub">>, <<"true">>),
>       ?XMLEL_BOOL_FIELD(<<"pubsub#persist_items">>, <<"false">>),
>       ?XMLEL_TEXT_FIELD(<<"pubsub#max_items">>, <<"10">>),
>       ?XMLEL_TEXT_FIELD(<<"pubsub#item_expire">>, <<"10000">>),

BTW, the 'pubsub#item_expire' option is currently not implemented.

>       ?XMLEL_TEXT_FIELD(<<"pubsub#max_payload_size">>, <<"8192">>) %8K
>       ]},


-- 
kael



More information about the ejabberd mailing list