From 32d548d99b395d859dac7faa5ea8a9c5114b3793 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Fri, 13 Jan 2017 13:36:28 +0300 Subject: [PATCH] Fix configuration commands (#1432) --- src/mod_configure.erl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/mod_configure.erl b/src/mod_configure.erl index 8f73a141a..b1827be05 100644 --- a/src/mod_configure.erl +++ b/src/mod_configure.erl @@ -341,16 +341,15 @@ adhoc_local_items(Acc, From, PermLev = get_permission_level(From), Nodes = recursively_get_local_items(PermLev, LServer, <<"">>, Server, Lang), - Nodes1 = lists:filter(fun (N) -> - Nd = fxml:get_tag_attr_s(<<"node">>, N), - F = get_local_features([], From, To, Nd, - Lang), - case F of - {result, [?NS_COMMANDS]} -> true; - _ -> false - end - end, - Nodes), + Nodes1 = lists:filter( + fun (#disco_item{node = Nd}) -> + F = get_local_features([], From, To, Nd, Lang), + case F of + {result, [?NS_COMMANDS]} -> true; + _ -> false + end + end, + Nodes), {result, Items ++ Nodes1}; _ -> Acc end. -- 2.40.0