aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-07-28 01:14:31 +0100
committerMatthew Wild <mwild1@gmail.com>2012-07-28 01:14:31 +0100
commit81bef2c93b53e006cbeebdffc80040af6b4daf68 (patch)
tree2732225257e7b8ade28695dad7c0df3f7cea00b1 /util/stanza.lua
parent8eec29745633bd84c2d325d42dbeeb4afd37d516 (diff)
parent47619af14cd24fcb48b4d2b4c4653f72b882087e (diff)
downloadprosody-81bef2c93b53e006cbeebdffc80040af6b4daf68.tar.gz
prosody-81bef2c93b53e006cbeebdffc80040af6b4daf68.zip
Merge with Florob
Diffstat (limited to 'util/stanza.lua')
-rw-r--r--util/stanza.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index 1449f707..5c430f1d 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -133,14 +133,14 @@ function stanza_mt:children()
end
function stanza_mt:childtags(name, xmlns)
- xmlns = xmlns or self.attr.xmlns;
local tags = self.tags;
local start_i, max_i = 1, #tags;
return function ()
for i = start_i, max_i do
local v = tags[i];
if (not name or v.name == name)
- and (not xmlns or xmlns == v.attr.xmlns) then
+ and ((not xmlns and self.attr.xmlns == v.attr.xmlns)
+ or v.attr.xmlns == xmlns) then
start_i = i+1;
return v;
end