aboutsummaryrefslogtreecommitdiff
path: root/src/mod_private.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_private.erl')
-rw-r--r--src/mod_private.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mod_private.erl b/src/mod_private.erl
index fa77ab5a1..487386fd9 100644
--- a/src/mod_private.erl
+++ b/src/mod_private.erl
@@ -27,10 +27,14 @@ start(Opts) ->
mnesia:create_table(private_storage,
[{disc_only_copies, [node()]},
{attributes, record_info(fields, private_storage)}]),
+ ejabberd_hooks:add(remove_user,
+ ?MODULE, remove_user, 50),
gen_iq_handler:add_iq_handler(ejabberd_sm, ?NS_PRIVATE,
?MODULE, process_sm_iq, IQDisc).
stop() ->
+ ejabberd_hooks:delete(remove_user,
+ ?MODULE, remove_user, 50),
gen_iq_handler:remove_iq_handler(ejabberd_sm, ?NS_PRIVATE).