mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +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(
|
||||
Host, ServerHost, {apply, ?MODULE, route}),
|
||||
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
|
||||
DefaultModule = plugin(Host, hd(Plugins)),
|
||||
DefaultNodeCfg = merge_config(
|
||||
[mod_pubsub_opt:default_node_config(Opts),
|
||||
DefaultModule:options()]),
|
||||
DefaultNodeCfg = mod_pubsub_opt:default_node_config(Opts),
|
||||
lists:foreach(
|
||||
fun(H) ->
|
||||
T = gen_mod:get_module_proc(H, config),
|
||||
|
Loading…
Reference in New Issue
Block a user