diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl index 991c2e434..6a83ed849 100644 --- a/src/mod_pubsub/node_hometree.erl +++ b/src/mod_pubsub/node_hometree.erl @@ -553,7 +553,7 @@ get_entity_affiliations(Host, Owner) -> SubKey = jlib:jid_tolower(Owner), GenKey = jlib:jid_remove_resource(SubKey), States = mnesia:match_object(#pubsub_state{stateid = {GenKey, '_'}, _ = '_'}), - NodeTree = case ets:lookup(gen_mod:get_module_proc(Host, pubsub_state), nodetree) of + NodeTree = case ets:lookup(gen_mod:get_module_proc(Host, config), nodetree) of [{nodetree, N}] -> N; _ -> nodetree_default end, @@ -610,7 +610,7 @@ get_entity_subscriptions(Host, Owner) -> ++ mnesia:match_object( #pubsub_state{stateid = {SubKey, '_'}, _ = '_'}) end, - NodeTree = case ets:lookup(gen_mod:get_module_proc(Host, pubsub_state), nodetree) of + NodeTree = case ets:lookup(gen_mod:get_module_proc(Host, config), nodetree) of [{nodetree, N}] -> N; _ -> nodetree_default end, diff --git a/src/mod_pubsub/node_pep.erl b/src/mod_pubsub/node_pep.erl index 84c9af7cc..fa28681b5 100644 --- a/src/mod_pubsub/node_pep.erl +++ b/src/mod_pubsub/node_pep.erl @@ -172,7 +172,7 @@ get_entity_affiliations(_Host, Owner) -> SubKey = jlib:jid_tolower(Owner), GenKey = jlib:jid_remove_resource(SubKey), States = mnesia:match_object(#pubsub_state{stateid = {GenKey, '_'}, _ = '_'}), - NodeTree = case ets:lookup(gen_mod:get_module_proc(D, pubsub_state), nodetree) of + NodeTree = case ets:lookup(gen_mod:get_module_proc(D, config), nodetree) of [{nodetree, N}] -> N; _ -> nodetree_default end, @@ -204,7 +204,7 @@ get_entity_subscriptions(_Host, Owner) -> ++ mnesia:match_object( #pubsub_state{stateid = {SubKey, '_'}, _ = '_'}) end, - NodeTree = case ets:lookup(gen_mod:get_module_proc(D, pubsub_state), nodetree) of + NodeTree = case ets:lookup(gen_mod:get_module_proc(D, config), nodetree) of [{nodetree, N}] -> N; _ -> nodetree_default end,