Skip to content

Commit

Permalink
making dialyzer happy
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysGonchar committed Jul 6, 2021
1 parent 673f86d commit 502c2db
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/mongoose_hooks.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1443,9 +1443,9 @@ mod_global_distrib_unknown_recipient(GlobalHost, Info) ->
%%% Internal functions
%%%----------------------------------------------------------------------

run_global_hook(HookName, Acc, Params) when is_map(Params) ->
{_, RetValue} = gen_hook:run_fold(HookName, global, Acc, Params),
RetValue;
%% run_global_hook(HookName, Acc, Params) when is_map(Params) ->
%% {_, RetValue} = gen_hook:run_fold(HookName, global, Acc, Params),
%% RetValue;
run_global_hook(HookName, Acc, Args) when is_list(Args) ->
ejabberd_hooks:run_fold(HookName, global, Acc, Args).

Expand All @@ -1454,10 +1454,10 @@ run_hook_for_host_type(HookName, undefined, Acc, Args) ->
text => <<"Running hook for an undefined host type">>,
hook_name => HookName, hook_acc => Acc, hook_args => Args}),
Acc;
run_hook_for_host_type(HookName, HostType, Acc, Params) when is_binary(HostType),
is_map(Params) ->
{_, RetValue} = gen_hook:run_fold(HookName, HostType, Acc, Params),
RetValue;
%% run_hook_for_host_type(HookName, HostType, Acc, Params) when is_binary(HostType),
%% is_map(Params) ->
%% {_, RetValue} = gen_hook:run_fold(HookName, HostType, Acc, Params),
%% RetValue;
run_hook_for_host_type(HookName, HostType, Acc, Args) when is_binary(HostType),
is_list(Args) ->
ejabberd_hooks:run_fold(HookName, HostType, Acc, Args).

0 comments on commit 502c2db

Please sign in to comment.