aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_component.lua7
-rw-r--r--plugins/muc/muc.lib.lua6
2 files changed, 5 insertions, 8 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 46db31b6..743a16a3 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -119,9 +119,10 @@ function module.add_host(module)
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
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 3e811f6b..65772375 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -353,11 +353,7 @@ module:hook("muc-disco#info", function(event)
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