mod_pubsub: Correctly wrap the list of subscriptions in a pubsub element

Wed, 29 Dec 2010 19:24:19 +0100

author
Kim Alvefur <zash@zash.se>
date
Wed, 29 Dec 2010 19:24:19 +0100
changeset 3988
a3104064e905
parent 3987
8fbf57722368
child 3989
692d221ef9bd
child 3993
cbfa0ea6668b

mod_pubsub: Correctly wrap the list of subscriptions in a pubsub element

plugins/mod_pubsub.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_pubsub.lua	Wed Dec 29 18:49:59 2010 +0500
+++ b/plugins/mod_pubsub.lua	Wed Dec 29 19:24:19 2010 +0100
@@ -74,7 +74,8 @@
 		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

mercurial