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
0
votes
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
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
@BekaGelashvili I was working on a similar problem described here [stackoverflow.com/questions/50208545/… with my ejabberd iq handler module. Could you help me out please?
– abhishek ranjan
1 Answers
0
votes
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
.