Comparison

plugins/mod_component.lua @ 8886:9aa35cb939ac

mod_component: Fix a wrongly-placed closing parenthesis, fixes #1164.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 08 Jun 2018 11:53:10 +0200
parent 8508:47115b0ca133
child 8888:cbcac5b9b7ce
comparison
equal deleted inserted replaced
8881:a0de4fc4acd5 8886:9aa35cb939ac
117 local query = stanza.tags[1]; 117 local query = stanza.tags[1];
118 local node = query.attr.node; 118 local node = query.attr.node;
119 if query.name == "query" and query.attr.xmlns == "http://jabber.org/protocol/disco#info" and (not node or node == "") then 119 if query.name == "query" and query.attr.xmlns == "http://jabber.org/protocol/disco#info" and (not node or node == "") then
120 local name = module:get_option_string("name"); 120 local name = module:get_option_string("name");
121 if name then 121 if name then
122 event.origin.send(st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" }) 122 local reply = st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" })
123 :tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") })):up() 123 :tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") }):up()
124 :tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up() 124 :tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up();
125 event.origin.send(reply);
125 return true; 126 return true;
126 end 127 end
127 end 128 end
128 end 129 end
129 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag()); 130 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag());