From b49a615e216f1aaf62ccb8d71250fba1b1240f0b Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Tue, 29 Mar 2016 13:19:16 +0200 Subject: [PATCH] Fix commands api option --- src/ejabberd_commands.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index e919d26ae..21872aa33 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -595,7 +595,7 @@ get_commands() -> UserCmds = [N || {N, _, _, user} <- CommandsList], Cmds = lists:foldl( - fun({add_commands, L}, Acc) -> + fun([{add_commands, L}], Acc) -> Cmds = case L of open -> OpenCmds; restricted -> RestrictedCmds; @@ -604,7 +604,7 @@ get_commands() -> _ when is_list(L) -> L end, lists:usort(Cmds ++ Acc); - ({remove_commands, L}, Acc) -> + ([{remove_commands, L}], Acc) -> Cmds = case L of open -> OpenCmds; restricted -> RestrictedCmds;