mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Fix Elvis report: Remove spaces in weird places
https://github.com/inaka/elvis_core/blob/main/doc_rules/elvis_style/no_space.md
This commit is contained in:
parent
74b80bfe08
commit
0304428d95
9 changed files with 11 additions and 12 deletions
|
@ -80,7 +80,7 @@ start_link() ->
|
||||||
add(Hook, Function, Seq) when is_function(Function) ->
|
add(Hook, Function, Seq) when is_function(Function) ->
|
||||||
add(Hook, global, undefined, Function, Seq).
|
add(Hook, global, undefined, Function, Seq).
|
||||||
|
|
||||||
-spec add(atom(), HostOrModule :: binary() | atom(), fun() | atom() , integer()) -> ok.
|
-spec add(atom(), HostOrModule :: binary() | atom(), fun() | atom(), integer()) -> ok.
|
||||||
add(Hook, Host, Function, Seq) when is_function(Function) ->
|
add(Hook, Host, Function, Seq) when is_function(Function) ->
|
||||||
add(Hook, Host, undefined, Function, Seq);
|
add(Hook, Host, undefined, Function, Seq);
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ handle_sync_event({send_xml, Packet}, _From, StateName,
|
||||||
El2
|
El2
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{xmlstreamelement , El3};
|
{xmlstreamelement, El3};
|
||||||
_ ->
|
_ ->
|
||||||
Packet
|
Packet
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -619,7 +619,7 @@ strings_to_binary(L) when is_list(L) ->
|
||||||
end;
|
end;
|
||||||
strings_to_binary({A, B, C, D}) when
|
strings_to_binary({A, B, C, D}) when
|
||||||
is_integer(A), is_integer(B), is_integer(C), is_integer(D) ->
|
is_integer(A), is_integer(B), is_integer(C), is_integer(D) ->
|
||||||
{A, B, C ,D};
|
{A, B, C, D};
|
||||||
strings_to_binary(T) when is_tuple(T) ->
|
strings_to_binary(T) when is_tuple(T) ->
|
||||||
list_to_tuple(strings_to_binary1(tuple_to_list(T)));
|
list_to_tuple(strings_to_binary1(tuple_to_list(T)));
|
||||||
strings_to_binary(X) ->
|
strings_to_binary(X) ->
|
||||||
|
|
|
@ -542,7 +542,7 @@ log(Call, Args, IP) ->
|
||||||
?INFO_MSG("API call ~ts ~p (~p)", [Call, hide_sensitive_args(Args), IP]).
|
?INFO_MSG("API call ~ts ~p (~p)", [Call, hide_sensitive_args(Args), IP]).
|
||||||
|
|
||||||
hide_sensitive_args(Args=[_H|_T]) ->
|
hide_sensitive_args(Args=[_H|_T]) ->
|
||||||
lists:map( fun({<<"password">>, Password}) -> {<<"password">>, ejabberd_config:may_hide_data(Password)};
|
lists:map(fun({<<"password">>, Password}) -> {<<"password">>, ejabberd_config:may_hide_data(Password)};
|
||||||
({<<"newpass">>,NewPassword}) -> {<<"newpass">>, ejabberd_config:may_hide_data(NewPassword)};
|
({<<"newpass">>,NewPassword}) -> {<<"newpass">>, ejabberd_config:may_hide_data(NewPassword)};
|
||||||
(E) -> E end,
|
(E) -> E end,
|
||||||
Args);
|
Args);
|
||||||
|
|
|
@ -142,8 +142,8 @@ mod_opt_type(servers) ->
|
||||||
econf:options(
|
econf:options(
|
||||||
#{
|
#{
|
||||||
certfile => econf:pem()
|
certfile => econf:pem()
|
||||||
}, [{return, map}])
|
}, [{return, map}]))},
|
||||||
)}, [{return, map}]),
|
[{return, map}]),
|
||||||
[{return, map}]),
|
[{return, map}]),
|
||||||
fun(Servers) ->
|
fun(Servers) ->
|
||||||
maps:fold(
|
maps:fold(
|
||||||
|
|
|
@ -1471,7 +1471,7 @@ get_room_occupants(Pid) ->
|
||||||
|
|
||||||
get_room_occupants_number(Room, Host) ->
|
get_room_occupants_number(Room, Host) ->
|
||||||
case get_room_pid_validate(Room, Host, <<"name">>, <<"service">>) of
|
case get_room_pid_validate(Room, Host, <<"name">>, <<"service">>) of
|
||||||
{Pid, _, _} when is_pid(Pid )->
|
{Pid, _, _} when is_pid(Pid)->
|
||||||
{ok, #{occupants_number := N}} = mod_muc_room:get_info(Pid),
|
{ok, #{occupants_number := N}} = mod_muc_room:get_info(Pid),
|
||||||
N;
|
N;
|
||||||
_ ->
|
_ ->
|
||||||
|
|
|
@ -217,7 +217,7 @@ need_transform(_) ->
|
||||||
|
|
||||||
transform({offline_msg, {U, S}, Timestamp, Expire, From, To, _, Packet}) ->
|
transform({offline_msg, {U, S}, Timestamp, Expire, From, To, _, Packet}) ->
|
||||||
#offline_msg{us = {U, S}, timestamp = Timestamp, expire = Expire,
|
#offline_msg{us = {U, S}, timestamp = Timestamp, expire = Expire,
|
||||||
from = From ,to = To, packet = Packet};
|
from = From, to = To, packet = Packet};
|
||||||
transform(#offline_msg{us = {U, S}, from = From, to = To,
|
transform(#offline_msg{us = {U, S}, from = From, to = To,
|
||||||
packet = El} = R) ->
|
packet = El} = R) ->
|
||||||
R#offline_msg{us = {iolist_to_binary(U), iolist_to_binary(S)},
|
R#offline_msg{us = {iolist_to_binary(U), iolist_to_binary(S)},
|
||||||
|
|
|
@ -4200,7 +4200,7 @@ delete_old_items(N) ->
|
||||||
fun(#pubsub_node{id = Nidx, type = Type}) ->
|
fun(#pubsub_node{id = Nidx, type = Type}) ->
|
||||||
case node_action(Host, Type,
|
case node_action(Host, Type,
|
||||||
remove_extra_items,
|
remove_extra_items,
|
||||||
[Nidx , N]) of
|
[Nidx, N]) of
|
||||||
{result, _} ->
|
{result, _} ->
|
||||||
ok;
|
ok;
|
||||||
{error, _} ->
|
{error, _} ->
|
||||||
|
|
|
@ -39,9 +39,8 @@ get_nameservers() ->
|
||||||
is_good_ns(Addr) ->
|
is_good_ns(Addr) ->
|
||||||
element(1,
|
element(1,
|
||||||
inet_res:nnslookup("a.root-servers.net", in, a, [{Addr,53}],
|
inet_res:nnslookup("a.root-servers.net", in, a, [{Addr,53}],
|
||||||
timer:seconds(5)
|
timer:seconds(5)))
|
||||||
)
|
=:= ok.
|
||||||
) =:= ok.
|
|
||||||
|
|
||||||
reg() ->
|
reg() ->
|
||||||
{ok, R} = win32reg:open([read]),
|
{ok, R} = win32reg:open([read]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue