]> granicus.if.org Git - ejabberd/commitdiff
Do not init nodes from mod_pubsub (#609)
authorChristophe Romain <christophe.romain@process-one.net>
Wed, 22 Jul 2015 06:03:27 +0000 (08:03 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Wed, 22 Jul 2015 06:03:27 +0000 (08:03 +0200)
Let each plugin do its own initialisation in init_plugins
init_nodes was an old function to be removed.

src/mod_pubsub.erl

index f572c33d175bd4cc64433724773da5d1bf850066..e17b61c568d8a299abe36a3a1b41f790fdf577d4 100644 (file)
@@ -312,7 +312,6 @@ init([ServerHost, Opts]) ->
     pubsub_migrate:update_node_database(Host, ServerHost),
     pubsub_migrate:update_state_database(Host, ServerHost),
     pubsub_migrate:update_lastitem_database(Host, ServerHost),
-    init_nodes(Host, ServerHost, NodeTree, Plugins),
     {_, State} = init_send_loop(ServerHost),
     {ok, State}.
 
@@ -386,14 +385,6 @@ terminate_plugins(Host, ServerHost, Plugins, TreePlugin) ->
     TreePlugin:terminate(Host, ServerHost),
     ok.
 
-init_nodes(Host, ServerHost, _NodeTree, Plugins) ->
-    case lists:member(<<"hometree">>, Plugins) of
-       true ->
-           create_node(Host, ServerHost, <<"/home">>, service_jid(Host), <<"hometree">>),
-           create_node(Host, ServerHost, <<"/home/", ServerHost/binary>>, service_jid(Host), <<"hometree">>);
-       false -> ok
-    end.
-
 send_loop(State) ->
     receive
        {presence, JID, Pid} ->