util.stanza: Iterate on childtags instead of all childs.
[prosody.git] / util / stanza.lua
index 16d558af04851a8c1a16a826d7a0f43c206a64f2..afaf9ce90b47e395d442c30b47a3bf2a95171bbe 100644 (file)
@@ -242,7 +242,7 @@ function stanza_mt.get_error(stanza)
        end
        type = error_tag.attr.type;
        
-       for child in error_tag:children() do
+       for child in error_tag:childtags() do
                if child.attr.xmlns == xmlns_stanzas then
                        if not text and child.name == "text" then
                                text = child:get_text();