mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +01:00
Add ability to hookup config transformer
This commit is contained in:
parent
869826c818
commit
4b3a1ec614
@ -27,10 +27,16 @@
|
||||
%%% API
|
||||
%%%===================================================================
|
||||
map_reduce(Y) ->
|
||||
F = fun(Y1) ->
|
||||
F =
|
||||
fun(Y1) ->
|
||||
Y2 = (validator())(Y1),
|
||||
Y3 = transform(Y2),
|
||||
case application:get_env(ejabberd, custom_config_transformer) of
|
||||
{ok, TransMod} when is_atom(TransMod) ->
|
||||
TransMod:transform(Y3);
|
||||
_ ->
|
||||
Y3
|
||||
end
|
||||
end,
|
||||
econf:validate(F, Y).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user