Merge pull request #8790 from lafirest/fix/exhook_log

fix(exhook): fix the error message of unknown hookpoint
This commit is contained in:
JianBo He 2022-08-27 13:33:51 +08:00 committed by GitHub
commit b8003765f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*- %% -*- mode: erlang -*-
{application, emqx_exhook, [ {application, emqx_exhook, [
{description, "EMQX Extension for Hook"}, {description, "EMQX Extension for Hook"},
{vsn, "5.0.2"}, {vsn, "5.0.3"},
{modules, []}, {modules, []},
{registered, []}, {registered, []},
{mod, {emqx_exhook_app, []}}, {mod, {emqx_exhook_app, []}},

View File

@ -231,7 +231,7 @@ resolve_hookspec(HookSpecs) when is_list(HookSpecs) ->
end, end,
case {lists:member(Name, AvailableHooks), lists:member(Name, MessageHooks)} of case {lists:member(Name, AvailableHooks), lists:member(Name, MessageHooks)} of
{false, _} -> {false, _} ->
error({unknown_hookpoint, Name}); error({unknown_hookpoint, Name0});
{true, false} -> {true, false} ->
Acc#{Name => #{}}; Acc#{Name => #{}};
{true, true} -> {true, true} ->