From: Christophe Romain Date: Tue, 11 Dec 2018 10:07:07 +0000 (+0100) Subject: Add hook on api call X-Git-Tag: 19.02~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6a557ec86b0a7cc07c480b65f3548467afaba74;p=ejabberd Add hook on api call --- diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 56a1518e4..eb8c0443d 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -492,6 +492,7 @@ do_execute_command(Command, Arguments) -> Module = Command#ejabberd_commands.module, Function = Command#ejabberd_commands.function, ?DEBUG("Executing command ~p:~p with Args=~p", [Module, Function, Arguments]), + ejabberd_hooks:run(api_call, [Module, Function, Arguments]), apply(Module, Function, Arguments). -spec get_tags_commands() -> [{string(), [string()]}].