mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01: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
@ -80,7 +80,7 @@ start_link() ->
|
||||
add(Hook, Function, Seq) when is_function(Function) ->
|
||||
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, undefined, Function, Seq);
|
||||
|
||||
|
@ -189,7 +189,7 @@ handle_sync_event({send_xml, Packet}, _From, StateName,
|
||||
El2
|
||||
end
|
||||
end,
|
||||
{xmlstreamelement , El3};
|
||||
{xmlstreamelement, El3};
|
||||
_ ->
|
||||
Packet
|
||||
end,
|
||||
|
@ -619,7 +619,7 @@ strings_to_binary(L) when is_list(L) ->
|
||||
end;
|
||||
strings_to_binary({A, B, C, D}) when
|
||||
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) ->
|
||||
list_to_tuple(strings_to_binary1(tuple_to_list(T)));
|
||||
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]).
|
||||
|
||||
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)};
|
||||
(E) -> E end,
|
||||
Args);
|
||||
|
@ -142,8 +142,8 @@ mod_opt_type(servers) ->
|
||||
econf:options(
|
||||
#{
|
||||
certfile => econf:pem()
|
||||
}, [{return, map}])
|
||||
)}, [{return, map}]),
|
||||
}, [{return, map}]))},
|
||||
[{return, map}]),
|
||||
[{return, map}]),
|
||||
fun(Servers) ->
|
||||
maps:fold(
|
||||
|
@ -1471,7 +1471,7 @@ get_room_occupants(Pid) ->
|
||||
|
||||
get_room_occupants_number(Room, Host) ->
|
||||
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),
|
||||
N;
|
||||
_ ->
|
||||
|
@ -217,7 +217,7 @@ need_transform(_) ->
|
||||
|
||||
transform({offline_msg, {U, S}, Timestamp, Expire, From, To, _, Packet}) ->
|
||||
#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,
|
||||
packet = El} = R) ->
|
||||
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}) ->
|
||||
case node_action(Host, Type,
|
||||
remove_extra_items,
|
||||
[Nidx , N]) of
|
||||
[Nidx, N]) of
|
||||
{result, _} ->
|
||||
ok;
|
||||
{error, _} ->
|
||||
|
@ -39,9 +39,8 @@ get_nameservers() ->
|
||||
is_good_ns(Addr) ->
|
||||
element(1,
|
||||
inet_res:nnslookup("a.root-servers.net", in, a, [{Addr,53}],
|
||||
timer:seconds(5)
|
||||
)
|
||||
) =:= ok.
|
||||
timer:seconds(5)))
|
||||
=:= ok.
|
||||
|
||||
reg() ->
|
||||
{ok, R} = win32reg:open([read]),
|
||||
|
Loading…
Reference in New Issue
Block a user