diff options
-rw-r--r-- | src/mod_pubsub/nodetree_virtual.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mod_pubsub/nodetree_virtual.erl b/src/mod_pubsub/nodetree_virtual.erl index 01706560b..51b686cec 100644 --- a/src/mod_pubsub/nodetree_virtual.erl +++ b/src/mod_pubsub/nodetree_virtual.erl @@ -93,9 +93,13 @@ set_node(_NodeRecord) -> get_node(Host, Node, _From) -> get_node(Host, Node). get_node(Host, Node) -> - #pubsub_node{nodeid = {Host, Node}, id = {Host, Node}, owners = [{"",Host,""}]}. + get_node({Host, Node}). get_node({Host, _} = NodeId) -> - #pubsub_node{nodeid = NodeId, id = NodeId, owners = [{"",Host,""}]}. + Record = #pubsub_node{nodeid = NodeId, id = NodeId}, + Module = list_to_atom("node_" ++ Record#pubsub_node.type), + Options = Module:options(), + Owners = [{"", Host, ""}], + Record#pubsub_node{owners = Owners, options = Options}. %% @spec (Host) -> [pubsubNode()] %% Host = mod_pubsub:host() | mod_pubsub:jid() |