util.stanza: Change get_error() to return nil rather than '' for no text
authorMatthew Wild <mwild1@gmail.com>
Sat, 11 Dec 2010 22:34:29 +0000 (22:34 +0000)
committerMatthew Wild <mwild1@gmail.com>
Sat, 11 Dec 2010 22:34:29 +0000 (22:34 +0000)
util/stanza.lua

index afaf9ce90b47e395d442c30b47a3bf2a95171bbe..16d558af04851a8c1a16a826d7a0f43c206a64f2 100644 (file)
@@ -242,7 +242,7 @@ function stanza_mt.get_error(stanza)
        end
        type = error_tag.attr.type;
        
-       for child in error_tag:childtags() do
+       for child in error_tag:children() do
                if child.attr.xmlns == xmlns_stanzas then
                        if not text and child.name == "text" then
                                text = child:get_text();