From b08c061683bb0eee97601a3b2866a2935c5a7890 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Thu, 30 Jul 2009 13:13:22 +0000 Subject: fix configuration result (EJAB-995) SVN Revision: 2408 --- src/mod_pubsub/mod_pubsub.erl | 5 ++--- src/mod_pubsub/node_hometree.erl | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index c549c584c..a216c76f2 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -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}; diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl index 81c242bc2..680fec39d 100644 --- a/src/mod_pubsub/node_hometree.erl +++ b/src/mod_pubsub/node_hometree.erl @@ -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)}. -- cgit v1.2.3