mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
make virtual nodes having default options
SVN Revision: 2352
This commit is contained in:
parent
4f0cd053c4
commit
67052929d5
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user