mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
mod_pubsub: Fix default node config parsing
Don't merge 'default_node_config' settings with the default options of the first configured node plugin. Otherwise, the latter might later override those of the plugin that should handle a node creation request. For example, the following configuration would lead to the 'flat' options being used by default for 'pep' nodes as well: mod_pubsub: plugins: - flat - pep
This commit is contained in:
parent
4a931b42ab
commit
b4399291ef
@ -265,10 +265,7 @@ init([ServerHost|_]) ->
|
|||||||
ejabberd_router:register_route(
|
ejabberd_router:register_route(
|
||||||
Host, ServerHost, {apply, ?MODULE, route}),
|
Host, ServerHost, {apply, ?MODULE, route}),
|
||||||
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
|
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
|
||||||
DefaultModule = plugin(Host, hd(Plugins)),
|
DefaultNodeCfg = mod_pubsub_opt:default_node_config(Opts),
|
||||||
DefaultNodeCfg = merge_config(
|
|
||||||
[mod_pubsub_opt:default_node_config(Opts),
|
|
||||||
DefaultModule:options()]),
|
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(H) ->
|
fun(H) ->
|
||||||
T = gen_mod:get_module_proc(H, config),
|
T = gen_mod:get_module_proc(H, config),
|
||||||
|
Loading…
Reference in New Issue
Block a user