xmlns => ?NS_COMPONENT,
lang => ejabberd_option:language(),
server => ejabberd_config:get_myname(),
- host_opts => dict:from_list(HostOpts1),
+ host_opts => maps:from_list(HostOpts1),
stream_version => undefined,
tls_options => TLSOpts,
global_routes => GlobalRoutes,
Txt = ?T("Unable to register route on existing local domain"),
xmpp_stream_in:send(State, xmpp:serr_conflict(Txt, Lang));
false ->
- NewHostOpts = case dict:is_key(RemoteServer, HostOpts) of
+ NewHostOpts = case maps:is_key(RemoteServer, HostOpts) of
true ->
HostOpts;
false ->
- case dict:find(global, HostOpts) of
+ case maps:find(global, HostOpts) of
{ok, GlobalPass} ->
- dict:from_list([{RemoteServer, GlobalPass}]);
+ maps:from_list([{RemoteServer, GlobalPass}]);
error ->
HostOpts
end
socket := Socket, ip := IP,
host_opts := HostOpts}) ->
fun(_) ->
- case dict:find(RemoteServer, HostOpts) of
+ case maps:find(RemoteServer, HostOpts) of
{ok, Password} ->
{Password, undefined};
error ->
[xmpp_socket:pp(Socket), Mech, RemoteServer,
ejabberd_config:may_hide_data(misc:ip_to_list(IP))]),
Routes = if GlobalRoutes ->
- dict:fetch_keys(HostOpts);
+ maps:keys(HostOpts);
true ->
[RemoteServer]
end,
check_from(From, #{host_opts := HostOpts}) ->
%% The default is the standard behaviour in XEP-0114
Server = From#jid.lserver,
- dict:is_key(Server, HostOpts).
+ maps:is_key(Server, HostOpts).
random_password() ->
str:sha(p1_rand:bytes(20)).
UserAccess = case UserAccess0 of
[] -> none;
_ ->
- dict:from_list(UserAccess0)
+ maps:from_list(UserAccess0)
end,
ContentTypes = build_list_content_types(
mod_http_fileserver_opt:content_types(Opts),
CanProceed = case {UserAccess, Auth} of
{none, _} -> true;
{_, {User, Pass}} ->
- case dict:find(User, UserAccess) of
+ case maps:find(User, UserAccess) of
{ok, Pass} -> true;
_ -> false
end;