24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

fix configuration result (EJAB-995)

SVN Revision: 2408
This commit is contained in:
Christophe Romain 2009-07-30 13:13:22 +00:00
parent cd68e0021e
commit b08c061683
2 changed files with 8 additions and 9 deletions

View File

@ -2918,14 +2918,13 @@ broadcast_config_notification(Host, Node, NodeId, Type, NodeOptions, Lang) ->
SubsByDepth when is_list(SubsByDepth) ->
Content = case get_option(NodeOptions, deliver_payloads) of
true ->
[{xmlelement, "x", [{"xmlns", ?NS_XDATA}, {"type", "form"}],
[{xmlelement, "x", [{"xmlns", ?NS_XDATA}, {"type", "result"}],
get_configure_xfields(Type, NodeOptions, Lang, [])}];
false ->
[]
end,
Stanza = event_stanza(
[{xmlelement, "items", nodeAttr(Node),
[{xmlelement, "item", itemAttr("configuration"), Content}]}]),
[{xmlelement, "configuration", nodeAttr(Node), Content}]),
broadcast_stanza(Host, Node, NodeId, Type,
NodeOptions, SubsByDepth, nodes, Stanza),
{result, true};

View File

@ -679,14 +679,14 @@ get_node_subscriptions(NodeId) ->
case Subscriptions of
[_|_] ->
lists:foldl(fun({S, SubID}, Acc) ->
[{J, S, SubID} | Acc];
(S, Acc) ->
[{J, S} | Acc]
[{J, S, SubID} | Acc];
(S, Acc) ->
[{J, S} | Acc]
end, [], Subscriptions);
[] ->
[];
[] ->
[];
_ ->
[{J, none}]
[{J, none}]
end
end,
{result, lists:flatmap(Tr, States)}.