25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Add private and roster local handlers to get listed in disco#info (EJAB-682)

This commit is contained in:
Badlop 2015-04-22 13:27:25 +02:00
parent 43f2064daa
commit 2e194bd997
2 changed files with 6 additions and 0 deletions

View File

@ -60,12 +60,15 @@ start(Host, Opts) ->
end,
ejabberd_hooks:add(remove_user, Host, ?MODULE,
remove_user, 50),
gen_iq_handler:add_iq_handler(ejabberd_local, Host,
?NS_PRIVATE, ?MODULE, process_sm_iq, IQDisc),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host,
?NS_PRIVATE, ?MODULE, process_sm_iq, IQDisc).
stop(Host) ->
ejabberd_hooks:delete(remove_user, Host, ?MODULE,
remove_user, 50),
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_PRIVATE),
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host,
?NS_PRIVATE).

View File

@ -100,6 +100,8 @@ start(Host, Opts) ->
webadmin_page, 50),
ejabberd_hooks:add(webadmin_user, Host, ?MODULE,
webadmin_user, 50),
gen_iq_handler:add_iq_handler(ejabberd_local, Host,
?NS_ROSTER, ?MODULE, process_iq, IQDisc),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host,
?NS_ROSTER, ?MODULE, process_iq, IQDisc).
@ -126,6 +128,7 @@ stop(Host) ->
webadmin_page, 50),
ejabberd_hooks:delete(webadmin_user, Host, ?MODULE,
webadmin_user, 50),
gen_iq_handler:remove_iq_handler(ejabberd_local, Host, ?NS_ROSTER),
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host,
?NS_ROSTER).