Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Premwoik committed Sep 8, 2021
1 parent d22fef3 commit 89bc64d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/mod_register.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
process_ip_access/1,
process_welcome_message/1]).

-ignore_xref([c2s_stream_features/3, process_iq/5, try_register/6, unauthenticated_iq_register/4]).
-ignore_xref([c2s_stream_features/3, process_iq/5, try_register/6, unauthenticated_iq_register/5]).

-include("mongoose.hrl").
-include("jlib.hrl").
Expand Down Expand Up @@ -120,10 +120,6 @@ ip_access_spec() ->

supported_features() -> [dynamic_domains].

%%%
%%% api
%%%

process_ip_access(KVs) ->
{[[{address, Address}], [{policy, Policy}]], []} = proplists:split(KVs, [address, policy]),
{Policy, Address}.
Expand All @@ -133,6 +129,10 @@ process_welcome_message(KVs) ->
Subject = proplists:get_value(subject, KVs, ""),
{Subject, Body}.

%%%
%%% Hooks and IQ handlers
%%%

-spec c2s_stream_features([exml:element()], mongooseim:host_type(), jid:lserver()) ->
[exml:element()].
c2s_stream_features(Acc, _HostType, _LServer) ->
Expand Down Expand Up @@ -200,12 +200,12 @@ handle_set(HostType, IQ, ClientJID, ServerJID, Source) ->
end.

which_child_elements(#xmlel{children = C} = Q) when length(C) =:= 1 ->
case Q#xmlel.children of
[#xmlel{name = <<"remove">>}] ->
only_remove_child;
[_] ->
bad_request
end;
case Q#xmlel.children of
[#xmlel{name = <<"remove">>}] ->
only_remove_child;
[_] ->
bad_request
end;
which_child_elements(#xmlel{children = C} = Q) when length(C) > 1 ->
case exml_query:subelement(Q, <<"remove">>) of
#xmlel{name = <<"remove">>} ->
Expand Down

0 comments on commit 89bc64d

Please sign in to comment.