]> granicus.if.org Git - ejabberd/commitdiff
fix configuration result (EJAB-995)
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 30 Jul 2009 13:13:22 +0000 (13:13 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 30 Jul 2009 13:13:22 +0000 (13:13 +0000)
SVN Revision: 2408

src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/node_hometree.erl

index c549c584cd574e33e1a14a4b8707701afbe51350..a216c76f2cc26cc916e7cb97b09305b2247380d0 100644 (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};
index 81c242bc20e4fb23f5c4d598db2b2c081fc1db62..680fec39d4ff41270cd9ef32d0f277e4597a2110 100644 (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)}.