Changeset

897:aeb05598dec1

Merge
author Matthew Wild <mwild1@gmail.com>
date Fri, 20 Mar 2009 20:17:05 +0000
parents 896:2c0b9e3c11c3 (current diff) 895:43f7653fb662 (diff)
children 898:8176d224208a
files core/stanza_router.lua
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/core/stanza_router.lua	Fri Mar 20 20:16:25 2009 +0000
+++ b/core/stanza_router.lua	Fri Mar 20 20:17:05 2009 +0000
@@ -51,11 +51,9 @@
 
 	if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling.
 	-- TODO verify validity of stanza (as well as JID validity)
-	if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then
+	if stanza.name == "iq" and #stanza.tags > 1 then
 		if stanza.attr.type == "set" or stanza.attr.type == "get" then
 			error("Invalid IQ");
-		elseif #stanza.tags > 1 and not(stanza.attr.type == "error" or stanza.attr.type == "result") then
-			error("Invalid IQ");
 		end
 	end