Diff

plugins/mod_component.lua @ 8888:cbcac5b9b7ce

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 08 Jun 2018 16:15:32 +0200
parent 8518:0de0018bdf91
parent 8886:9aa35cb939ac
child 9562:acf74ad0b795
line wrap: on
line diff
--- a/plugins/mod_component.lua	Fri Jun 08 15:27:13 2018 +0200
+++ b/plugins/mod_component.lua	Fri Jun 08 16:15:32 2018 +0200
@@ -119,9 +119,10 @@
 				if query.name == "query" and query.attr.xmlns == "http://jabber.org/protocol/disco#info" and (not node or node == "") then
 					local name = module:get_option_string("name");
 					if name then
-						event.origin.send(st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" })
-							:tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") })):up()
-							:tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up()
+						local reply = st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" })
+							:tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") }):up()
+							:tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up();
+						event.origin.send(reply);
 						return true;
 					end
 				end