Changeset

8888:cbcac5b9b7ce

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 08 Jun 2018 16:15:32 +0200
parents 8885:d4f5d47f874d (current diff) 8887:c47f220580fd (diff)
children 8889:c4e430c69f88
files plugins/mod_component.lua plugins/muc/muc.lib.lua
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
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
--- a/plugins/muc/muc.lib.lua	Fri Jun 08 15:27:13 2018 +0200
+++ b/plugins/muc/muc.lib.lua	Fri Jun 08 16:15:32 2018 +0200
@@ -353,11 +353,7 @@
 end);
 
 function room_mt:get_disco_items(stanza)
-	local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items");
-	for room_jid in self:each_occupant() do
-		reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up();
-	end
-	return reply;
+	return st.reply(stanza):query("http://jabber.org/protocol/disco#items");
 end
 
 function room_mt:handle_kickable(origin, stanza) -- luacheck: ignore 212