Using send_stanza_c2s to create pubsub node

Hi - am trying to figure out how to use mod_rest to create a pubsub node

Sending the following using mod_rest

send_stanza_c2s admin mydomain.org rest "<iq type='set' from='admin@mydomain.org' to='pubsub.mydomain.org' id='create1'> <pubsub xmlns='http://jabber.org/protocol/pubsub'><create node=aa/></pubsub></iq>"

*I get error: *

Problem 'error badarg' occurred executing the command.\nStacktrace: [{p1_fsm,send_event,2,[{file,\"src\/p1_fsm.erl\"},{line,222}]},\n             {ejabberd_commands,execute_command2,2,\n                                [{file,\"src\/ejabberd_commands.erl\"},\n                                 {line,320}]},\n             {ejabberd_ctl,call_command,3,\n                           [{file,\"src\/ejabberd_ctl.erl\"},{line,292}]},\n             {ejabberd_ctl,try_call_command,3,\n                           [{file,\"src\/ejabberd_ctl.erl\"},{line,268}]},\n             {ejabberd_ctl,process2,3,\n                           [{file,\"src\/ejabberd_ctl.erl\"},{line,217}]},\n             {mod_rest,maybe_post_request,3,\n                       [{file,\"src\/mod_rest.erl\"},{line,92}]},\n             {mod_rest,process,2,[{file,\"src\/mod_rest.erl\"},{line,52}]},\n             {ejabberd_http,process,5,\n                            [{file,\"src\/ejabberd_http.erl\"},{line,367}

*Relevent config: *

pubsub_createnode:
admin: allow

mod_pubsub:
access_createnode: pubsub_createnode
ignore_pep_from_offline: true
last_item_cache: false
plugins:
- "flat"
- "hometree"
- "pep" # pep requires mod_caps

Did you try getting in touch

Did you try getting in touch with mod_rest author ?
It is likely that some update may be needed with the latest version.

Syndicate content