]> granicus.if.org Git - ejabberd/commitdiff
Add hook on api call
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 11 Dec 2018 10:07:07 +0000 (11:07 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 11 Dec 2018 10:07:07 +0000 (11:07 +0100)
src/ejabberd_commands.erl

index 56a1518e42df9c5eda68d34145bf250b2fdc3c37..eb8c0443deb24c1b72e76faeaaf5fe7f47ce6e5f 100644 (file)
@@ -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()]}].