Mercurial > prosody-modules
comparison mod_delegation/mod_delegation.lua @ 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 | 2440a75e868f |
children | e7b5ab44339c |
comparison
equal
deleted
inserted
replaced
1725:d85d5b0bf977 | 1774:7bfc23b2c038 |
---|---|
183 end | 183 end |
184 | 184 |
185 local iq = forwarded.tags[1] | 185 local iq = forwarded.tags[1] |
186 if #forwarded ~= 1 or iq.name ~= "iq" or | 186 if #forwarded ~= 1 or iq.name ~= "iq" or |
187 iq.attr.xmlns ~= 'jabber:client' or | 187 iq.attr.xmlns ~= 'jabber:client' or |
188 (iq.attr.type =='result' and #iq ~= 1) or | 188 (iq.attr.type =='result' and #iq > 1) or |
189 (iq.attr.type == 'error' and #iq > 2) then | 189 (iq.attr.type == 'error' and #iq > 2) then |
190 module:log("warn", "ignoring invalid iq result from managing entity %s", stanza.attr.from) | 190 module:log("warn", "ignoring invalid iq result from managing entity %s", stanza.attr.from) |
191 stanza_cache[stanza.attr.from][stanza.attr.id] = nil | 191 stanza_cache[stanza.attr.from][stanza.attr.id] = nil |
192 return true | 192 return true |
193 end | 193 end |