changeset 1774:7bfc23b2c038

mod_delegation: fixed handling of <iq> results without children
author Goffi <goffi@goffi.org>
date Fri, 31 Jul 2015 18:44:06 +0200
parents d85d5b0bf977
children 0d78bb31348e
files mod_delegation/mod_delegation.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_delegation/mod_delegation.lua	Thu May 07 23:39:54 2015 +0200
+++ b/mod_delegation/mod_delegation.lua	Fri Jul 31 18:44:06 2015 +0200
@@ -185,7 +185,7 @@
 	local iq = forwarded.tags[1]
 	if #forwarded ~= 1 or iq.name ~= "iq" or
         iq.attr.xmlns ~= 'jabber:client' or
-		(iq.attr.type =='result' and #iq ~= 1) or
+		(iq.attr.type =='result' and #iq > 1) or
 		(iq.attr.type == 'error' and #iq > 2) then
 		module:log("warn", "ignoring invalid iq result from managing entity %s", stanza.attr.from)
 		stanza_cache[stanza.attr.from][stanza.attr.id] = nil