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

make virtual nodes having default options

SVN Revision: 2352
This commit is contained in:
Christophe Romain 2009-07-02 10:11:59 +00:00
parent 4f0cd053c4
commit 67052929d5

View File

@ -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()