Diff

plugins/muc/mod_muc.lua @ 5342:4c8c8285bf88

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 10 Mar 2013 11:29:47 +0000
parent 5335:bb81c13d2c6f
child 5376:ba9be0be4bbb
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Sun Feb 03 15:52:27 2013 +0100
+++ b/plugins/muc/mod_muc.lua	Sun Mar 10 11:29:47 2013 +0000
@@ -126,9 +126,10 @@
 	if type == "error" or type == "result" then return; end
 	if stanza.name == "iq" and type == "get" then
 		local xmlns = stanza.tags[1].attr.xmlns;
-		if xmlns == "http://jabber.org/protocol/disco#info" then
+		local node = stanza.tags[1].attr.node;
+		if xmlns == "http://jabber.org/protocol/disco#info" and not node then
 			origin.send(get_disco_info(stanza));
-		elseif xmlns == "http://jabber.org/protocol/disco#items" then
+		elseif xmlns == "http://jabber.org/protocol/disco#items" and not node then
 			origin.send(get_disco_items(stanza));
 		elseif xmlns == "http://jabber.org/protocol/muc#unique" then
 			origin.send(st.reply(stanza):tag("unique", {xmlns = xmlns}):text(uuid_gen())); -- FIXME Random UUIDs can theoretically have collisions