aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-02-21 19:06:33 -0500
committerdaurnimator <quae@daurnimator.com>2014-02-21 19:06:33 -0500
commit957d62d3e4127f4e9ac3e3cd4491e9fdc78e6d75 (patch)
tree0039ed5a7ddbfc18a1ba779b6d487b35c418c81d /plugins/muc
parent25fc86d5f19e1f51cb55196a594033ea3d11d18b (diff)
downloadprosody-957d62d3e4127f4e9ac3e3cd4491e9fdc78e6d75.tar.gz
prosody-957d62d3e4127f4e9ac3e3cd4491e9fdc78e6d75.zip
plugins/muc/muc.lib: Add disco iq handlers with compatible argument signature
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 39240b16..081e4c6d 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -827,6 +827,16 @@ function room_mt:destroy(newjid, reason, password)
module:fire_event("muc-room-destroyed", { room = self });
end
+function room_mt:handle_disco_info_get_query(origin, stanza)
+ origin.send(self:get_disco_info(stanza));
+ return true;
+end
+
+function room_mt:handle_disco_items_get_query(origin, stanza)
+ origin.send(self:get_disco_items(stanza));
+ return true;
+end
+
function room_mt:handle_admin_item_set_command(origin, stanza)
local item = stanza.tags[1].tags[1];
if item.attr.jid then -- Validate provided JID
@@ -951,11 +961,9 @@ function room_mt:handle_iq_to_room(origin, stanza)
local type = stanza.attr.type;
local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns;
if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" and not stanza.tags[1].attr.node then
- origin.send(self:get_disco_info(stanza));
- return true;
+ return self:handle_disco_info_get_query(origin, stanza)
elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" and not stanza.tags[1].attr.node then
- origin.send(self:get_disco_items(stanza));
- return true;
+ return self:handle_disco_items_get_query(origin, stanza)
elseif xmlns == "http://jabber.org/protocol/muc#admin" then
local item = stanza.tags[1].tags[1];
if item and item.name == "item" then