mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02: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
1 changed files with 1 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue