diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-07-05 17:40:12 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-07-05 17:40:12 +0100 |
commit | f2b3328bc1fb3dce23a783e2cd8932d0e1fba864 (patch) | |
tree | d14b44262cee1dc74af32fbaa4658385b9552152 /util/stanza.lua | |
parent | 7a97efab5c5bf02bdba1840027de6e434b475ebb (diff) | |
parent | 2429531070ba2f2273a77c3512abbca5acda92ff (diff) | |
download | prosody-f2b3328bc1fb3dce23a783e2cd8932d0e1fba864.tar.gz prosody-f2b3328bc1fb3dce23a783e2cd8932d0e1fba864.zip |
Merge 0.9->trunk
Diffstat (limited to 'util/stanza.lua')
-rw-r--r-- | util/stanza.lua | 4 |
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 |