diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2009-07-30 13:13:22 +0000 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2009-07-30 13:13:22 +0000 |
commit | b08c061683bb0eee97601a3b2866a2935c5a7890 (patch) | |
tree | 4c519c7b6c1b2d33331af88598386e96f13c6ce8 /src | |
parent | do not crash on unmatched request (diff) |
fix configuration result (EJAB-995)
SVN Revision: 2408
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub/mod_pubsub.erl | 5 | ||||
-rw-r--r-- | src/mod_pubsub/node_hometree.erl | 12 |
2 files changed, 8 insertions, 9 deletions
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)}. |