Beka Gelashvili
Beka Gelashvili

Reputation: 83

writing custom namespace IQ stanza in ejabberd using xmpp library

I have nearly updated ejabberd from 16.02 to 18.01. Main problem is that my module which i developed in older version is not working properly, because in older version of ejabberd wasn't using xmpp library (instead for that there was jlib), so iq record definition has changed.. i don't know how to add my custom namespace in xmpp library

Upvotes: 0

Views: 401

Answers (1)

Tianpo Gao
Tianpo Gao

Reputation: 71

You can add custom namespace by adding new plugin in eJabberd.

Please follow the step below:

  1. Add your custom namespace in jlib.hrl with define macro.
  2. Create a new plugin module in eJabberd which can refer mod_ping.
  3. Modify section modules of ejabberd.cfg to enable your plugin.

Please remember to register your plugin with gen_iq_handler:add_iq_handler, when your plugin is started.

If you want to add a feature which can be negotiated you must register your plugin with mod_disco:register_feature.

Upvotes: 0

Related Questions