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
Asked
Active
Viewed 353 times
0
-
it's not easy and it's boring, you should add new clause to xmpp_codec:get_mode/3 and add new module for decoding and encoding your xml. – Pouriya Feb 05 '18 at 15:27
-
yesterday i tried making my own xmpp spec..i registered my spec module with xmpp:register_code(conversation) but after restarting ejabberd there is a critical error – Beka Gelashvili Feb 06 '18 at 07:00
-
@BekaGelashvili I was working on a similar problem described here [https://stackoverflow.com/questions/50208545/what-does-feature-not-implemented-response-mean] with my ejabberd iq handler module. Could you help me out please? – abhishek ranjan May 16 '18 at 12:12
1 Answers
0
You can add custom namespace by adding new plugin in eJabberd.
Please follow the step below:
- Add your custom namespace in
jlib.hrl
withdefine
macro. - Create a new plugin module in eJabberd which can refer
mod_ping
. - Modify section
modules
ofejabberd.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
.

Tianpo Gao
- 71
- 1
- 5
-
Thanks for replaying. i have done it as you described and my module worked perfectly.. (by the way jlib.hrl is depricated in newest ejabberd). i have to use xmpp instead of jlib, beacause i include some ejabberd hrls which therefore includes xmpp.hrl, so there is conflict between jlib.hrl and xmpp.hrl. – Beka Gelashvili Feb 06 '18 at 06:53