mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Reflect recent pubsub changes in configuration transformer
This commit is contained in:
parent
4fe995c272
commit
0c4818daca
@ -343,16 +343,16 @@ transform_module_options(Opts) ->
|
||||
true
|
||||
end, Opts).
|
||||
|
||||
transform_module(_Host, mod_http_bind, Opts, Acc) ->
|
||||
transform_module(Host, mod_http_bind, Opts, Acc) ->
|
||||
warn_replaced_module(mod_http_bind, mod_bosh),
|
||||
{{mod_bosh, Opts}, Acc};
|
||||
transform_module(_Host, mod_vcard_xupdate_odbc, Opts, Acc) ->
|
||||
transform_module(Host, mod_bosh, Opts, Acc);
|
||||
transform_module(Host, mod_vcard_xupdate_odbc, Opts, Acc) ->
|
||||
warn_replaced_module(mod_vcard_xupdate_odbc, mod_vcard_xupdate),
|
||||
{{mod_vcard_xupdate, Opts}, Acc};
|
||||
transform_module(_Host, mod_vcard_ldap, Opts, Acc) ->
|
||||
transform_module(Host, mod_vcard_xupdate, Opts, Acc);
|
||||
transform_module(Host, mod_vcard_ldap, Opts, Acc) ->
|
||||
warn_replaced_module(mod_vcard_ldap, mod_vcard, ldap),
|
||||
{{mod_vcard, [{db_type, ldap}|Opts]}, Acc};
|
||||
transform_module(_Host, M, Opts, Acc) when (M == mod_announce_odbc orelse
|
||||
transform_module(Host, mod_vcard, [{db_type, ldap}|Opts], Acc);
|
||||
transform_module(Host, M, Opts, Acc) when (M == mod_announce_odbc orelse
|
||||
M == mod_blocking_odbc orelse
|
||||
M == mod_caps_odbc orelse
|
||||
M == mod_last_odbc orelse
|
||||
@ -366,7 +366,7 @@ transform_module(_Host, M, Opts, Acc) when (M == mod_announce_odbc orelse
|
||||
M == mod_vcard_odbc) ->
|
||||
M1 = strip_odbc_suffix(M),
|
||||
warn_replaced_module(M, M1, sql),
|
||||
{{M1, [{db_type, sql}|Opts]}, Acc};
|
||||
transform_module(Host, M1, [{db_type, sql}|Opts], Acc);
|
||||
transform_module(_Host, mod_blocking, Opts, Acc) ->
|
||||
Opts1 = lists:filter(
|
||||
fun({db_type, _}) ->
|
||||
@ -407,6 +407,34 @@ transform_module(_Host, mod_http_upload, Opts, Acc) ->
|
||||
true
|
||||
end, Opts),
|
||||
{{mod_http_upload, Opts1}, Acc};
|
||||
transform_module(_Host, mod_pubsub, Opts, Acc) ->
|
||||
Opts1 = lists:map(
|
||||
fun({plugins, Plugins}) ->
|
||||
{plugins,
|
||||
lists:filter(
|
||||
fun(Plugin) ->
|
||||
case lists:member(
|
||||
Plugin,
|
||||
[<<"buddy">>, <<"club">>, <<"dag">>,
|
||||
<<"dispatch">>, <<"hometree">>, <<"mb">>,
|
||||
<<"mix">>, <<"online">>, <<"private">>,
|
||||
<<"public">>]) of
|
||||
true ->
|
||||
?WARNING_MSG(
|
||||
"Plugin '~s' of mod_pubsub is not "
|
||||
"supported anymore and has been "
|
||||
"automatically removed from 'plugins' "
|
||||
"option. ~s",
|
||||
[Plugin, adjust_hint()]),
|
||||
false;
|
||||
false ->
|
||||
true
|
||||
end
|
||||
end, Plugins)};
|
||||
(Opt) ->
|
||||
Opt
|
||||
end, Opts),
|
||||
{{mod_pubsub, Opts1}, Acc};
|
||||
transform_module(_Host, Mod, Opts, Acc) ->
|
||||
{{Mod, Opts}, Acc}.
|
||||
|
||||
@ -524,6 +552,7 @@ validator() ->
|
||||
#{'_' =>
|
||||
econf:options(
|
||||
#{db_type => econf:atom(),
|
||||
plugins => econf:list(econf:binary()),
|
||||
'_' => econf:any()},
|
||||
[])},
|
||||
[]),
|
||||
|
@ -3892,7 +3892,9 @@ mod_opt_type(nodetree) ->
|
||||
mod_opt_type(pep_mapping) ->
|
||||
econf:map(econf:binary(), econf:binary());
|
||||
mod_opt_type(plugins) ->
|
||||
econf:list(econf:binary());
|
||||
econf:list(
|
||||
econf:enum([<<"flat">>, <<"pep">>]),
|
||||
[unique]);
|
||||
mod_opt_type(host) ->
|
||||
econf:host();
|
||||
mod_opt_type(hosts) ->
|
||||
|
Loading…
Reference in New Issue
Block a user