mod_pubsub: Correctly wrap the list of subscriptions in a pubsub element
authorKim Alvefur <zash@zash.se>
Wed, 29 Dec 2010 18:24:19 +0000 (19:24 +0100)
committerKim Alvefur <zash@zash.se>
Wed, 29 Dec 2010 18:24:19 +0000 (19:24 +0100)
plugins/mod_pubsub.lua

index 90c198151d220690f739e18535dfa1b150ba1910..80300df29f56f6cde34a444f6ebf08efbd3c1185 100644 (file)
@@ -74,7 +74,8 @@ function handlers.get_subscriptions(origin, stanza, subscriptions)
                return origin.send(pubsub_error_reply(stanza, ret));
        end
        local reply = st.reply(stanza)
-               :tag("subscriptions", { xmlns = xmlns_pubsub });
+               :tag("pubsub", { xmlns = xmlns_pubsub })
+                       :tag("subscriptions");
        for _, sub in ipairs(ret) do
                reply:tag("subscription", { node = sub.node, jid = sub.jid, subscription = 'subscribed' }):up();
        end