Diff

plugins/mod_pubsub.lua @ 3916:ffe5a0d36f57

mod_pubsub: Return disco#info stanza from build_disco_info()
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Dec 2010 04:15:54 +0000
parent 3915:e24fcbb01fb6
child 3918:f30c5bad29b8
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua	Tue Dec 21 04:15:29 2010 +0000
+++ b/plugins/mod_pubsub.lua	Tue Dec 21 04:15:54 2010 +0000
@@ -205,10 +205,11 @@
 end
 
 local function build_disco_info(service)
-	disco_info = st.stanza("query", { xmlns = "http://jabber.org/protocol/disco#info" })
+	local disco_info = st.stanza("query", { xmlns = "http://jabber.org/protocol/disco#info" })
 		:tag("identity", { category = "pubsub", type = "service" }):up()
 		:tag("feature", { var = "http://jabber.org/protocol/pubsub" }):up();
 	add_disco_features_from_service(disco_info, service);
+	return disco_info;
 end
 
 module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function (event)